]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/CHR10.scl
Default property editing restores assertions
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / CHR10.scl
1 module { export = [main], chr }
2 import "StandardLibrary"
3
4 data V = V { x :: Double, y :: Double }
5
6 main = ()
7   where
8     constraint X V 
9     X V { ?x } => print ?x
10     X V { ?y } => print ?y
11     True => X V { x = 1.0, y = 2.0 }
12     True => X V { x = 3.0, y = 4.0 }
13 --
14 1.0
15 2.0
16 3.0
17 4.0
18 ()
19 --
20 module { export = [main], chr }
21 import "StandardLibrary"
22
23 data V = V { x :: Double, y :: Double }
24
25 main = ()
26   where
27     constraint X V 
28     True => X V { x = 1.0 }
29 --
30 9:15-9:28: Field y not defined.