]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.runtime/scl/Prelude.scl
Minor updates to Document/All.scl and Prelude.scl
[simantics/platform.git] / bundles / org.simantics.scl.runtime / scl / Prelude.scl
index 7e558bdc4fd0c5d1216675919f5465b0042391b1..d5d2788285d45a30c815a303be8937dd5f60ad68 100644 (file)
@@ -1305,6 +1305,11 @@ orElse :: Maybe a -> (<e> a) -> <e> a
 orElse (Just x) _   = x
 orElse Nothing  def = def
 
+@inline
+orElseM :: Maybe a -> (<e> Maybe a) -> <e> Maybe a
+orElseM mx@(Just x) _   = mx
+orElseM Nothing     def = def
+
 /// Either ///
 
 """
@@ -2283,16 +2288,6 @@ instance Show TypeRep where
         isSpecialType (TApply a _) = isSpecialType a
 */
 
-// ByteArray
-
-importJava "java.util.Arrays" where
-    @private
-    @JavaName toString
-    byteArrayToString :: ByteArray -> String
-
-instance Show ByteArray where
-    show = byteArrayToString
-
 // Type
 
 @private