]> gerrit.simantics Code Review - simantics/platform.git/commitdiff
Inlined Prelude/maybe 78/1878/1 private/acorn-debug-tools
authorTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 21 Jun 2018 20:19:09 +0000 (23:19 +0300)
committerTuukka Lehtonen <tuukka.lehtonen@semantum.fi>
Thu, 21 Jun 2018 20:19:09 +0000 (23:19 +0300)
gitlab #31

Change-Id: I88298efc212596ad57adf468ed54b8f268050126

bundles/org.simantics.scl.runtime/scl/Prelude.scl

index 03eabb66fb8ecd2ff7218fa5191db648350ee280..80b4d0ad794d8eca76d5210c5783fca6cba9a933 100644 (file)
@@ -1292,6 +1292,7 @@ fromMaybe default maybeValue = match maybeValue with
     _ -> default
 
 "`maybe def f v` returns `def` if `v=Nothing` and `f x` if `v=Just x`."
+@inline
 maybe :: b -> (a -> <e> b) -> Maybe a -> <e> b
 maybe n _ Nothing  = n
 maybe _ f (Just x) = f x