summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/basis.urs1
-rw-r--r--lib/ur/option.ur5
-rw-r--r--lib/ur/option.urs1
3 files changed, 7 insertions, 0 deletions
diff --git a/lib/ur/basis.urs b/lib/ur/basis.urs
index 1bfd9da6..67564108 100644
--- a/lib/ur/basis.urs
+++ b/lib/ur/basis.urs
@@ -42,6 +42,7 @@ val minus : t ::: Type -> num t -> t -> t -> t
val times : t ::: Type -> num t -> t -> t -> t
val divide : t ::: Type -> num t -> t -> t -> t
val mod : t ::: Type -> num t -> t -> t -> t
+val exp : t ::: Type -> num t -> t -> t -> t
val num_int : num int
val num_float : num float
diff --git a/lib/ur/option.ur b/lib/ur/option.ur
index 5c89fc9d..05c50d1f 100644
--- a/lib/ur/option.ur
+++ b/lib/ur/option.ur
@@ -49,3 +49,8 @@ fun get [a] (x : a) (o : option a) =
case o of
None => x
| Some v => v
+
+fun unsafeGet [a] (o : option a) =
+ case o of
+ None => error <xml>Option.unsafeGet: encountered None</xml>
+ | Some v => v
diff --git a/lib/ur/option.urs b/lib/ur/option.urs
index ba43613f..126999a3 100644
--- a/lib/ur/option.urs
+++ b/lib/ur/option.urs
@@ -12,3 +12,4 @@ 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