summaryrefslogtreecommitdiff
path: root/lib/ur/option.urs
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ur/option.urs')
-rw-r--r--lib/ur/option.urs16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/ur/option.urs b/lib/ur/option.urs
new file mode 100644
index 0000000..c30c40e
--- /dev/null
+++ b/lib/ur/option.urs
@@ -0,0 +1,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