diff options
-rw-r--r-- | src/lacweb.grm | 2 | ||||
-rw-r--r-- | tests/constraint.lac | 16 |
2 files changed, 17 insertions, 1 deletions
diff --git a/src/lacweb.grm b/src/lacweb.grm index 84877eee..95e13c50 100644 --- a/src/lacweb.grm +++ b/src/lacweb.grm @@ -242,7 +242,7 @@ rcone : ([]) | ident COLON cexp COMMA rcone ((ident, cexp) :: rcone) ident : CSYMBOL (CName CSYMBOL, s (CSYMBOLleft, CSYMBOLright)) - | SYMBOL (CVar ([], SYMBOL), s (SYMBOLleft, SYMBOLright)) + | path (CVar path, s (pathleft, pathright)) eapps : eterm (eterm) | eapps eterm (EApp (eapps, eterm), s (eappsleft, etermright)) 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 |