summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2012-04-21 15:47:02 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2012-04-21 15:47:02 -0400
commit4ba39cb7e4cdc2231460043c1e5b7308a225329b (patch)
tree165d8f853e8893de71822e03938cef56007ec894 /src
parent64be34d44a0de6a4710b3bff9feb087df7dcc70c (diff)
Antiquote for PRIMARY KEY
Diffstat (limited to 'src')
-rw-r--r--src/urweb.grm10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/urweb.grm b/src/urweb.grm
index 80e40bc3..c81ca9e6 100644
--- a/src/urweb.grm
+++ b/src/urweb.grm
@@ -300,6 +300,7 @@ fun tnamesOf (e, _) =
| dcon of string * con option
| pkopt of exp
+ | pk of exp
| commaOpt of unit
| cst of exp
@@ -707,9 +708,9 @@ pmodes : ([])
commaOpt: ()
| COMMA ()
-pkopt : (EVar (["Basis"], "no_primary_key", Infer), dummy)
- | PRIMARY KEY tnames (let
- val loc = s (PRIMARYleft, tnamesright)
+pk : LBRACE LBRACE eexp RBRACE RBRACE (eexp)
+ | tnames (let
+ val loc = s (tnamesleft, tnamesright)
val e = (EVar (["Basis"], "primary_key", TypesOnly), loc)
val e = (ECApp (e, #1 (#1 tnames)), loc)
@@ -725,6 +726,9 @@ pkopt : (EVar (["Basis"], "no_primary_key", Infe
(EApp (e, witness), loc)
end)
+pkopt : (EVar (["Basis"], "no_primary_key", Infer), dummy)
+ | PRIMARY KEY pk (pk)
+
valis : vali ([vali])
| vali AND valis (vali :: valis)