diff options
author | 2012-11-28 11:41:54 -0500 | |
---|---|---|
committer | 2012-11-28 11:41:54 -0500 | |
commit | 9157968f41a0cc24e6621e2860f50a98866ed541 (patch) | |
tree | 3fcdb678f49ee4d5a3c2c04364828fc97cfae1ff /lib/ur/option.ur | |
parent | 3ef0f1fcb1df60f2d5944a9ff2902d0885fcb13f (diff) |
Standard library additions: Option.unsafeGet, Basis.exp
Diffstat (limited to 'lib/ur/option.ur')
-rw-r--r-- | lib/ur/option.ur | 5 |
1 files changed, 5 insertions, 0 deletions
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 |