From c81c24b4feb3fae3c13861f1bcaafab697a6bb7e Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 14 Sep 2008 11:02:18 -0400 Subject: SQL sequences --- src/core_util.sml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/core_util.sml') 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 -- cgit v1.2.3