]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/CHR6.scl
(refs #7250) CHR bugfixes, cleaning up unit tests
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / CHR6.scl
1 module {
2     export = [main],
3     chr
4 }
5
6 import "StandardLibrary"
7
8 ruleset RS where
9     constraint X Integer
10     -X ?value, X ?value => True
11     X ?value => print "A \(?value)"
12     
13 main :: ()
14 main = ()
15   where
16     rs = createRS
17     include RS rs
18     X ?value => print "B \(?value)"
19     True     => X 1
20     True     => X 2
21     True     => X 1
22 --
23 A 1
24 B 1
25 A 2
26 B 2
27 ()