X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FArity1.scl;h=fc21692fc583a83216bc23e3bee15fc9af2dcbe9;hp=fa48e47c17efdce12aa2b8270c9fe9083ab96a23;hb=cb5fc8d606d8b322563e9345c441eecfa7f01753;hpb=0580ea8b675c868685993b0780c9ecc31010f681 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl index fa48e47c1..fc21692fc 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl @@ -1,9 +1,22 @@ - -data Foo a = Foo a - -f :: Foo a -> a -f = \Foo a -> a - -main = "Not to be executed" --- -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 -> 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> got . \ No newline at end of file