Added Maybe-related functions; restricted imports from .dcl
[CleanReadLine.git] / ReadLine.dcl
index 734ca20..7828e88 100644 (file)
@@ -1,6 +1,6 @@
 definition module ReadLine
 
-import StdEnv
+import StdClass
 
 :: Maybe a = Nothing | Just a
 :: HistoryItem = {line :: String, timestamp :: String}
@@ -9,6 +9,11 @@ import StdEnv
 instance toString HistoryItem
 instance toString HistoryState
 
+//Maybe functions
+isNothing :: !(Maybe .x) -> Bool
+isJust    :: !(Maybe .x) -> Bool
+fromJust  :: !(Maybe .x) -> .x
+
 //Non-library functions
 setReadLineName :: !String !*env -> *env