From c6703f267f1ddfb589e6748607bdd1166c391e51 Mon Sep 17 00:00:00 2001 From: "john.j.camilleri" Date: Wed, 29 Jan 2014 11:17:50 +0000 Subject: [PATCH] Maybe.gf: add isJust function (synonym for exists) --- lib/src/prelude/Maybe.gf | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/src/prelude/Maybe.gf b/lib/src/prelude/Maybe.gf index 52c9c6427..f2ea1bd00 100644 --- a/lib/src/prelude/Maybe.gf +++ b/lib/src/prelude/Maybe.gf @@ -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"