]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.scl.compiler / tests / org / simantics / scl / compiler / tests / scl / MatchingWithoutTypeAnnotations.scl
diff --git a/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl b/bundles/org.simantics.scl.compiler/tests/org/simantics/scl/compiler/tests/scl/MatchingWithoutTypeAnnotations.scl
new file mode 100644 (file)
index 0000000..80d1477
--- /dev/null
@@ -0,0 +1,10 @@
+\r
+data List a = Nil | Cons a (List a)\r
+\r
+//first :: List Integer -> Integer\r
+first Nil = 0 :: Integer\r
+first (Cons x _) = x\r
+\r
+main = first (Cons (9 :: Integer) (Cons (8 :: Integer) Nil))\r
+--\r
+9
\ No newline at end of file