diff options
author | 2008-07-01 16:06:58 -0400 | |
---|---|---|
committer | 2008-07-01 16:06:58 -0400 | |
commit | e8002363e5d7764edf9a06ec0717f212ebbee26f (patch) | |
tree | d26925f997a9ab94b4f6617cc73a96c8f2923e00 /tests/constraint.lac | |
parent | cdc1211c43e9073a4d03472ffb549c67df281cea (diff) |
Tested constraints through functors
Diffstat (limited to 'tests/constraint.lac')
-rw-r--r-- | tests/constraint.lac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/constraint.lac b/tests/constraint.lac index 54c77093..e350a4ea 100644 --- a/tests/constraint.lac +++ b/tests/constraint.lac @@ -27,3 +27,19 @@ structure M' = struct 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 |