comparison src/corify.sml @ 338:e976b187d73a

SQL sequences
author Adam Chlipala <adamc@hcoop.net>
date Sun, 14 Sep 2008 11:02:18 -0400
parents 4260ad920c36
children 075b36dbb1a4
comparison
equal deleted inserted replaced
337:18d5affa790d 338:e976b187d73a
861 val (st, n) = St.bindVal st x n 861 val (st, n) = St.bindVal st x n
862 val s = x 862 val s = x
863 in 863 in
864 ([(L'.DTable (x, n, corifyCon st c, s), loc)], st) 864 ([(L'.DTable (x, n, corifyCon st c, s), loc)], st)
865 end 865 end
866 | L.DSequence (_, x, n) =>
867 let
868 val (st, n) = St.bindVal st x n
869 val s = x
870 in
871 ([(L'.DSequence (x, n, s), loc)], st)
872 end
866 873
867 | L.DDatabase s => ([(L'.DDatabase s, loc)], st) 874 | L.DDatabase s => ([(L'.DDatabase s, loc)], st)
868 875
869 and corifyStr ((str, _), st) = 876 and corifyStr ((str, _), st) =
870 case str of 877 case str of
915 | L.DSgn (_, n', _) => Int.max (n, n') 922 | L.DSgn (_, n', _) => Int.max (n, n')
916 | L.DStr (_, n', _, str) => Int.max (n, Int.max (n', maxNameStr str)) 923 | L.DStr (_, n', _, str) => Int.max (n, Int.max (n', maxNameStr str))
917 | L.DFfiStr (_, n', _) => Int.max (n, n') 924 | L.DFfiStr (_, n', _) => Int.max (n, n')
918 | L.DExport _ => n 925 | L.DExport _ => n
919 | L.DTable (_, _, n', _) => Int.max (n, n') 926 | L.DTable (_, _, n', _) => Int.max (n, n')
927 | L.DSequence (_, _, n') => Int.max (n, n')
920 | L.DDatabase _ => n) 928 | L.DDatabase _ => n)
921 0 ds 929 0 ds
922 930
923 and maxNameStr (str, _) = 931 and maxNameStr (str, _) =
924 case str of 932 case str of