[Ur] Unification Problems

David Snider david at davidsnider.net
Sun Oct 21 17:39:43 EDT 2012


What's the correct way of doing this?

Error: Some constructor unification variables are undetermined in 
declaration

cookie userSession : { Email : string, Password : string }

... snip ...

fun checkPassword r =
let
    val cryptPass = {Email=r.Email, Password=Sha.hash r.Password}
in
    re' <- oneOrNoRows1(SELECT user.Id
                         FROM user
                        WHERE user.Email = {[cryptPass.Email]}
                          AND user.Password = {[cryptPass.Password]});
    case re' of
       None => return False
     | Some re => setCookie userSession { Value = cryptPass, 
Expires=None,Secure=False };
       return True
end






More information about the Ur mailing list