]> gerrit.simantics Code Review - simantics/platform.git/blobdiff - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl
Merge "Ensure GetElementClassRequest is not constructed without elementFactory"
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Arity1.scl
index fa48e47c17efdce12aa2b8270c9fe9083ab96a23..fc21692fc583a83216bc23e3bee15fc9af2dcbe9 100644 (file)
@@ -1,9 +1,22 @@
-\r
-data Foo a = Foo a\r
-\r
-f :: Foo a -> a\r
-f = \Foo a -> a \r
-\r
-main = "Not to be executed"\r
---\r
-5:6-5:11: Arity is 1 but 2 patterns have been given.
\ No newline at end of file
+data Foo a = Foo a
+
+f :: Foo a -> a
+f = \Foo a -> a 
+
+main = "Not to be executed"
+--
+3:1-3:2: Possible problem: type declaration has 1 parameter types, but function definition has 2 parameters.
+4:6-4:11: Arity is 1 but 2 patterns have been given.
+--
+import "Prelude"
+
+f :: Integer -> Integer -> <Proc> Integer
+f x = do
+    print x
+    x
+
+main = "Not to be executed"
+--
+3:1-3:2: Possible problem: type declaration has 2 parameter types, but function definition has 1 parameters.
+5:5-5:12: No side-effects allowed here.
+6:5-6:6: Expected <Integer -> <Proc> Integer> got <Integer>.
\ No newline at end of file