]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/ListSyntax8.scl
Fixed multiple issues causing dangling references to discarded queries
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / ListSyntax8.scl
1 import "Prelude"
2
3 a :: [Either Integer Integer]
4 a = [Left 1, Right 2, Left 3, Right 4]
5
6 lefts :: [Either a b] -> [a]
7 lefts l = [x | Left x <- l] 
8
9 main :: [Integer]
10 main = lefts a
11 --
12 [1, 3]