diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-04-07 12:24:31 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-04-07 12:24:31 -0400 |
commit | e52d6c0bc6e2e911515d21c6acc1e311a8e30db9 (patch) | |
tree | b422a6ade536f96b318a9d9547f2f2c95562691a /src/core_util.sml | |
parent | 69400f0524e8bcaa264eed203b8581992a4d1f7d (diff) |
UNIQUE constraints
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/core_util.sml b/src/core_util.sml index b1d07b79..b342f2f7 100644 --- a/src/core_util.sml +++ b/src/core_util.sml @@ -933,10 +933,12 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} = (DValRec vis', loc)) end | DExport _ => S.return2 dAll - | DTable (x, n, c, s) => - S.map2 (mfc ctx c, + | DTable (x, n, c, s, e) => + S.bind2 (mfc ctx c, fn c' => - (DTable (x, n, c', s), loc)) + S.map2 (mfe ctx e, + fn e' => + (DTable (x, n, c', s, e'), loc))) | DSequence _ => S.return2 dAll | DDatabase _ => S.return2 dAll | DCookie (x, n, c, s) => @@ -1058,7 +1060,7 @@ 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) => + | DTable (x, n, c, s, _) => let val t = (CApp ((CFfi ("Basis", "sql_table"), #2 d'), c), #2 d') in @@ -1134,7 +1136,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 |