comparison tests/constraint.lac @ 89:d3ee072fa609

Tested constraints through functors
author Adam Chlipala <adamc@hcoop.net>
date Tue, 01 Jul 2008 16:06:58 -0400
parents 7bab29834cd6
children
comparison
equal deleted inserted replaced
88:7bab29834cd6 89:d3ee072fa609
25 25
26 con nm' = M.nm 26 con nm' = M.nm
27 con r' = M.r 27 con r' = M.r
28 con combo = [nm' = int] ++ r' 28 con combo = [nm' = int] ++ r'
29 end 29 end
30
31
32 signature S' = sig
33 con r1 :: {Type}
34 con r2 :: {Type}
35
36 constraint r1 ~ r2
37 end
38
39 functor F (M : S) : S' = struct
40 con r1 = [M.nm = int]
41 con r2 = M.r
42
43 open constraints M
44 constraint r1 ~ r2
45 end