]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/CHR11.scl
Supply SVG text editor with element measurement context
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / CHR11.scl
1 module { export = [main], features = [chr] }
2 import "Prelude"
3
4 ruleset Foo where
5     constraint Foo Integer
6
7 main = ()
8   where
9     foo = createFoo
10     include Foo foo
11     
12     when Foo ?x
13     then print ?x
14     
15     when True
16     then Foo 2
17     
18     when Foo ?x
19          ?x < 5
20     then Foo (?x + 1)
21 --
22 2
23 3
24 4
25 5
26 ()