[Ur] typing bind

Adam Chlipala adamc at impredicative.com
Thu Aug 18 07:36:31 EDT 2011


Gergely Buday wrote:
> 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.
>    

The situation is exactly the same as in Haskell.  The key is that [src 
<- source 0] by itself is not an expression.  Rather, the holistic form 
[x <- e1; e2] is shorthand for [bind e1 (fn x => e2)].



More information about the Ur mailing list