[Ur] typing bind

Gergely Buday gbuday at gmail.com
Thu Aug 18 07:33:46 EDT 2011


Hi there,

in the expression

src <- source 0

src becomes of type source int, according to the compiler, but it is
not clear how the typing happens.  <- is syntactic sugar for the bind
function, as I understand, which has type

val bind : m ::: (Type -> Type) -> t1 ::: Type -> t2 ::: Type
           -> monad m
           -> m t1 -> (t1 -> m t2)
           -> m t2

and

val source : t ::: Type -> t -> transaction (source t)

How typing is done here?

- Gergely



More information about the Ur mailing list