]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.db/scl/Simantics/DB.scl
New type class MonadE and corresponding monad syntax with edo keyword
[simantics/platform.git] / bundles / org.simantics.scl.db / scl / Simantics / DB.scl
index 702c710c8bb3b55a8f3b77ebea9a3ae1188442f9..b24df17f8639c40cb2a020f130a911e8bf547912 100644 (file)
@@ -428,6 +428,10 @@ currentModel = match activeModel (currentProject ()) with
     Just model -> model
     Nothing -> fail "No active model."
 
+"Gives the current active model if it exists or Nothing otherwise."
+possibleCurrentModel :: <ReadGraph> Maybe Resource
+possibleCurrentModel = activeModel (currentProject ())
+    
 startUndoPoint :: String -> <WriteGraph> ()
 startUndoPoint string = do
     markUndoPoint ()