summaryrefslogtreecommitdiff
path: root/lib/ur/option.urs
blob: c30c40e78630f9803b39ee0e6bd35152dbbd01b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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 app : m ::: (Type -> Type) -> a ::: Type -> monad m -> (a -> m {}) -> t a -> m {}
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