comparison src/shake.sml @ 707:d8217b4cb617

PRIMARY KEY
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Apr 2009 16:14:31 -0400
parents e6706a1df013
children f152f215a02c
comparison
equal deleted inserted replaced
706:1fb318c17546 707:d8217b4cb617
57 | _ => st} 57 | _ => st}
58 58
59 val (usedE, usedC, table_cs) = 59 val (usedE, usedC, table_cs) =
60 List.foldl 60 List.foldl
61 (fn ((DExport (_, n), _), (usedE, usedC, table_cs)) => (IS.add (usedE, n), usedE, table_cs) 61 (fn ((DExport (_, n), _), (usedE, usedC, table_cs)) => (IS.add (usedE, n), usedE, table_cs)
62 | ((DTable (_, _, c, _, e, _), _), (usedE, usedC, table_cs)) => 62 | ((DTable (_, _, c, _, pe, _, ce, _), _), (usedE, usedC, table_cs)) =>
63 let 63 let
64 val (usedE, usedC) = usedVars (usedE, usedC) e 64 val (usedE, usedC) = usedVars (usedE, usedC) pe
65 val (usedE, usedC) = usedVars (usedE, usedC) ce
65 in 66 in
66 (usedE, usedC, c :: table_cs) 67 (usedE, usedC, c :: table_cs)
67 end 68 end
68 | (_, acc) => acc) (IS.empty, IS.empty, []) file 69 | (_, acc) => acc) (IS.empty, IS.empty, []) file
69 70
77 in 78 in
78 (cdef, foldl (fn ((_, n, t, e, _), edef) => 79 (cdef, foldl (fn ((_, n, t, e, _), edef) =>
79 IM.insert (edef, n, (all_ns, t, e))) edef vis) 80 IM.insert (edef, n, (all_ns, t, e))) edef vis)
80 end 81 end
81 | ((DExport _, _), acc) => acc 82 | ((DExport _, _), acc) => acc
82 | ((DTable (_, n, c, _, _, _), _), (cdef, edef)) => 83 | ((DTable (_, n, c, _, _, _, _, _), _), (cdef, edef)) =>
83 (cdef, IM.insert (edef, n, ([], c, dummye))) 84 (cdef, IM.insert (edef, n, ([], c, dummye)))
84 | ((DSequence (_, n, _), _), (cdef, edef)) => 85 | ((DSequence (_, n, _), _), (cdef, edef)) =>
85 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) 86 (cdef, IM.insert (edef, n, ([], dummyt, dummye)))
86 | ((DDatabase _, _), acc) => acc 87 | ((DDatabase _, _), acc) => acc
87 | ((DCookie (_, n, c, _), _), (cdef, edef)) => 88 | ((DCookie (_, n, c, _), _), (cdef, edef)) =>