summaryrefslogtreecommitdiff
path: root/src/urweb.grm
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 14:11:32 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 14:11:32 -0400
commitfd1a963a81327f7b6a20a0f2ac131d2525649400 (patch)
tree053aee5bbd985b79f0d1901bc4fb72a44d48c4aa /src/urweb.grm
parente52d6c0bc6e2e911515d21c6acc1e311a8e30db9 (diff)
Track uniqueness sets in table types
Diffstat (limited to 'src/urweb.grm')
-rw-r--r--src/urweb.grm19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 784c62ee..ad92ff11 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -294,9 +294,9 @@ fun tagIn bt =
| query1 of exp
| tables of (con * exp) list
| tname of con
- | tnameW of (con * con)
- | tnames of con
- | tnames' of (con * con) list
+ | tnameW of con * con
+ | tnames of (con * con) * (con * con) list
+ | tnames' of (con * con) * (con * con) list
| table of con * exp
| tident of con
| fident of con
@@ -493,7 +493,9 @@ cst : UNIQUE tnames (let
val loc = s (UNIQUEleft, tnamesright)
val e = (EVar (["Basis"], "unique", Infer), loc)
- val e = (ECApp (e, tnames), loc)
+ val e = (ECApp (e, #1 (#1 tnames)), loc)
+ val e = (ECApp (e, (CRecord (#2 tnames), loc)), loc)
+ val e = (EDisjointApp e, loc)
in
(EDisjointApp e, loc)
end)
@@ -505,12 +507,11 @@ tnameW : tname (let
(tname, (CWild (KType, loc), loc))
end)
-tnames : tnameW (CRecord [tnameW], s (tnameWleft, tnameWright))
- | LPAREN tnames' RPAREN (CRecord tnames', s (LPARENleft, RPARENright))
- | LBRACE LBRACE cexp RBRACE RBRACE (cexp)
+tnames : tnameW (tnameW, [])
+ | LPAREN tnames' RPAREN (tnames')
-tnames': tnameW ([tnameW])
- | tnameW COMMA tnames' (tnameW :: tnames')
+tnames': tnameW (tnameW, [])
+ | tnameW COMMA tnames' (#1 tnames', tnameW :: #2 tnames')
valis : vali ([vali])
| vali AND valis (vali :: valis)