]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Arity1.scl
(refs #7307) Added features field to SCL module header
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Arity1.scl
1 data Foo a = Foo a
2
3 f :: Foo a -> a
4 f = \Foo a -> a 
5
6 main = "Not to be executed"
7 --
8 3:1-3:2: Possible problem: type declaration has 1 parameter types, but function definition has 2 parameters.
9 4:6-4:11: Arity is 1 but 2 patterns have been given.
10 --
11 import "Prelude"
12
13 f :: Integer -> Integer -> <Proc> Integer
14 f x = do
15     print x
16     x
17
18 main = "Not to be executed"
19 --
20 3:1-3:2: Possible problem: type declaration has 2 parameter types, but function definition has 1 parameters.
21 5:5-5:12: No side-effects allowed here.
22 6:5-6:6: Expected <Integer -> <Proc> Integer> got <Integer>.