[Ur] Code reuse and type constraints

Gabriel Riba griba2001 at gmail.com
Wed Feb 11 05:29:19 EST 2015


Adam Chlipala <adamc <at> csail.mit.edu> writes:

> The solution is again a standard ML idiom.
> 
> signature SET = sig
>    type item
>    type t
>    val empty: t
>    val singleton : item -> t
>    val insert: item -> t -> t
>    val member: item -> t -> bool
>    val foldr: b ::: Type -> (item -> b -> b) -> b -> t -> b
> end

Signature definitions (signature SET = sig ... end) make the parser fail. It
works otherwise.




More information about the Ur mailing list