]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/LambdaMatch.scl
Merged changes from feature/scl to master.
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / LambdaMatch.scl
diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/LambdaMatch.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/LambdaMatch.scl
new file mode 100644 (file)
index 0000000..7e9103a
--- /dev/null
@@ -0,0 +1,10 @@
+import "Prelude"\r
+\r
+f :: Maybe String -> String\r
+f = \match\r
+     Just a -> a\r
+     Nothing -> ""\r
+\r
+main = f Nothing + f (Just "foo")\r
+--\r
+foo\r