Mercurial > urweb
diff src/core_util.sml @ 338:e976b187d73a
SQL sequences
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 14 Sep 2008 11:02:18 -0400 |
parents | 42dfb0d61cf0 |
children | 075b36dbb1a4 |
line wrap: on
line diff
--- a/src/core_util.sml Sat Sep 13 20:15:30 2008 -0400 +++ b/src/core_util.sml Sun Sep 14 11:02:18 2008 -0400 @@ -631,6 +631,7 @@ 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 @@ | 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 @@ | 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