[Ur] disjointness proof in type-level functions

Sergey Mironov grrwlf at gmail.com
Wed Aug 7 12:04:26 EDT 2013


2013/8/7 Sergey Mironov <grrwlf at gmail.com>:
>
>> Also, have you considered just referring to users by name to simplify your
>> schema?
>
> Yes, but seems I need generic case in my app: users should be able to
> register themselves. I'll need user roles as well, and that is what
> I'll refer to by name.

Ah, Or did you mean using plain

table users : {Name : string, Pass : string} PRIMARY KEY Id

instead of constructors? Yes that works fine, but I'm trying to write
as less generic functions as possible to protect myself from running
into things I'm not familiar with. Basically, I'm rewriting auth.ur
from examples, with explicit function signatures included. Not sure if
it actually saves me or not :)

By the way. Need syntax hint. Can I translate 'fun .. and' syntax into 'val's ?

For example,

fun loginHandler row = ..
and login {} = ...

into

val loginHandler : $(login_form) -> transaction page = fn li =>
and login : unit -> transaction page = fn {} => ...

(does not work as written because of syntax errors reported by the compiler)

Sergey



More information about the Ur mailing list