import "Prelude" hiding (fromMaybe) import "Random" importJava "org.simantics.scl.compiler.tests.imports.Maybe4Imports" where toMaybeDouble :: String -> Maybe a fromMaybe :: a -> Maybe a -> a fromMaybe _ (Just v) = v fromMaybe def _ = def f x = do a = fromMaybe (-1.0) (toMaybeDouble x) b = fromMaybe (-1.0) (toMaybeDouble ("1" + x)) a+b main = withSeed 123 (f "2.0") -- 14.0