]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Forall3.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 / Forall3.scl
1
2 data List a = Nil | Cons a (List a)
3
4 build :: (forall l. l -> (a -> l -> l) -> l) -> List a
5 build f = f Nil Cons
6
7 main = build (\nil cons -> cons (1 :: Integer) (Cons (2 :: Integer) nil))
8                                              // ^^^^
9 -- 
10 7:48-7:73: Expected <a> got <List Integer>.
11 7:69-7:72: Expected <List Integer> got <a>.