Mercurial > urweb
view lib/ur/option.urs @ 2244:e4a7e3cd6f11
Use uniform representation of comparisons for better simplification.
author | Ziv Scully <ziv@mit.edu> |
---|---|
date | Mon, 20 Jul 2015 23:25:44 -0700 |
parents | 36428d853c97 |
children |
line wrap: on
line source
datatype t = datatype Basis.option val monad : monad t val eq : a ::: Type -> eq a -> eq (t a) val ord : a ::: Type -> ord a -> ord (t a) val isNone : a ::: Type -> t a -> bool val isSome : a ::: Type -> t a -> bool val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b val bind : a ::: Type -> b ::: Type -> (a -> option b) -> t a -> t b val get : a ::: Type -> a -> option a -> a val unsafeGet : a ::: Type -> option a -> a