Mercurial > urweb
diff 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 |
line wrap: on
line diff
--- a/tests/constraint.lac Tue Jul 01 15:58:02 2008 -0400 +++ b/tests/constraint.lac Tue Jul 01 16:06:58 2008 -0400 @@ -27,3 +27,19 @@ con r' = M.r con combo = [nm' = int] ++ r' end + + +signature S' = sig + con r1 :: {Type} + con r2 :: {Type} + + constraint r1 ~ r2 +end + +functor F (M : S) : S' = struct + con r1 = [M.nm = int] + con r2 = M.r + + open constraints M + constraint r1 ~ r2 +end