mirror of
https://github.com/GrammaticalFramework/gf-rgl.git
synced 2026-10-26 01:33:18 -06:00
Maybe.gf: add isJust function (synonym for exists)
This commit is contained in:
1 parent
e249ae54d1
commit
8c978b3e1d
1 file changed
+1
@@ -26,6 +26,7 @@ resource Maybe = open Prelude, Predef in {
|
||||
|
||||
-- Functions
|
||||
exists : (T : Type) -> Maybe T -> Bool = \_,m -> m.exists ;
|
||||
isJust : (T : Type) -> Maybe T -> Bool = \_,m -> m.exists ;
|
||||
fromJust : (T : Type) -> Maybe T -> T = \_,m -> case m.exists of {
|
||||
True => m.inner ;
|
||||
False => Predef.error "Called fromJust with Nothing"
|
||||
|
||||
Reference in new issue
Block a user