aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core_util.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 11:02:18 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-14 11:02:18 -0400
commitc81c24b4feb3fae3c13861f1bcaafab697a6bb7e (patch)
tree4f168489261d0202a9d664e548dd71a10665df46 /src/core_util.sml
parent0faed8b64498534297bd797108b659802815aefc (diff)
SQL sequences
Diffstat (limited to 'src/core_util.sml')
-rw-r--r--src/core_util.sml10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core_util.sml b/src/core_util.sml
index dfd6fa77..9b6b7d39 100644
--- a/src/core_util.sml
+++ b/src/core_util.sml
@@ -631,6 +631,7 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, decl = fd, bind} =
S.map2 (mfc ctx c,
fn c' =>
(DTable (x, n, c', s), loc))
+ | DSequence _ => S.return2 dAll
| DDatabase _ => S.return2 dAll
and mfvi ctx (x, n, t, e, s) =
@@ -716,7 +717,13 @@ fun mapfoldB (all as {bind, ...}) =
| DExport _ => ctx
| DTable (x, n, c, s) =>
let
- val t = (CApp ((CFfi ("Basis", "table"), #2 d'), c), #2 d')
+ val t = (CApp ((CFfi ("Basis", "sql_table"), #2 d'), c), #2 d')
+ in
+ bind (ctx, NamedE (x, n, t, NONE, s))
+ end
+ | DSequence (x, n, s) =>
+ let
+ val t = (CFfi ("Basis", "sql_sequence"), #2 d')
in
bind (ctx, NamedE (x, n, t, NONE, s))
end
@@ -770,6 +777,7 @@ val maxName = foldl (fn ((d, _) : decl, count) =>
| DValRec vis => foldl (fn ((_, n, _, _, _), count) => Int.max (n, count)) count vis
| DExport _ => count
| DTable (_, n, _, _) => Int.max (n, count)
+ | DSequence (_, n, _) => Int.max (n, count)
| DDatabase _ => count) 0
end