1 import "Prelude" hiding (fromMaybe)
4 importJava "org.simantics.scl.compiler.tests.imports.Maybe4Imports" where
5 toMaybeDouble :: String -> <Random> Maybe a
7 fromMaybe :: a -> Maybe a -> a
8 fromMaybe _ (Just v) = v
12 a = fromMaybe (-1.0) (toMaybeDouble x)
13 b = fromMaybe (-1.0) (toMaybeDouble ("1" + x))
16 main = withSeed 123 (f "2.0")