summaryrefslogtreecommitdiff
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 16:14:31 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-04-07 16:14:31 -0400
commit26ad31287745567b98b357de9793a0e795c63334 (patch)
tree6fa2aa05d829b2b71c6e2d778b4898999992a00f /src/core_util.sml
parent98370da7e9f70e3d83f666019b765e15f617b846 (diff)
PRIMARY KEY
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index df8bb271..320a0326 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -933,14 +933,18 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
(DValRec vis', loc))
end
| DExport _ => S.return2 dAll
- | DTable (x, n, c, s, e, cc) =>
+ | DTable (x, n, c, s, pe, pc, ce, cc) =>
S.bind2 (mfc ctx c,
fn c' =>
- S.bind2 (mfe ctx e,
- fn e' =>
- S.map2 (mfc ctx cc,
- fn cc' =>
- (DTable (x, n, c', s, e', cc'), loc))))
+ S.bind2 (mfe ctx pe,
+ fn pe' =>
+ S.bind2 (mfc ctx pc,
+ fn pc' =>
+ S.bind2 (mfe ctx ce,
+ fn ce' =>
+ S.map2 (mfc ctx cc,
+ fn cc' =>
+ (DTable (x, n, c', s, pe', pc', ce', cc'), loc))))))
| DSequence _ => S.return2 dAll
| DDatabase _ => S.return2 dAll
| DCookie (x, n, c, s) =>
@@ -1062,11 +1066,11 @@ fun mapfoldB (all as {bind, ...}) =
foldl (fn ((x, n, t, e, s), ctx) => bind (ctx, NamedE (x, n, t, NONE, s)))
ctx vis
| DExport _ => ctx
- | DTable (x, n, c, s, _, cc) =>
+ | DTable (x, n, c, s, _, pc, _, cc) =>
let
val loc = #2 d'
val ct = (CFfi ("Basis", "sql_table"), loc)
- val ct = (CApp (ct, c), loc)
+ val ct = (CApp (ct, (CConcat (pc, cc), loc)), loc)
val ct = (CApp (ct, cc), loc)
in
bind (ctx, NamedE (x, n, ct, NONE, s))
@@ -1141,7 +1145,7 @@ val maxName = foldl (fn ((d, _) : decl, count) =>
| DVal (_, n, _, _, _) => Int.max (n, count)
| DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis
| DExport _ => count
- | DTable (_, n, _, _, _, _) => Int.max (n, count)
+ | DTable (_, n, _, _, _, _, _, _) => Int.max (n, count)
| DSequence (_, n, _) => Int.max (n, count)
| DDatabase _ => count
| DCookie (_, n, _, _) => Int.max (n, count)) 0