Mercurial > urweb
comparison src/shake.sml @ 705:e6706a1df013
Track uniqueness sets in table types
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 07 Apr 2009 14:11:32 -0400 |
parents | 70cbdcf5989b |
children | d8217b4cb617 |
comparison
equal
deleted
inserted
replaced
704:70cbdcf5989b | 705:e6706a1df013 |
---|---|
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, _, e, _), _), (usedE, usedC, table_cs)) => |
63 let | 63 let |
64 val (usedE, usedC) = usedVars (usedE, usedC) e | 64 val (usedE, usedC) = usedVars (usedE, usedC) e |
65 in | 65 in |
66 (usedE, usedC, c :: table_cs) | 66 (usedE, usedC, c :: table_cs) |
67 end | 67 end |
77 in | 77 in |
78 (cdef, foldl (fn ((_, n, t, e, _), edef) => | 78 (cdef, foldl (fn ((_, n, t, e, _), edef) => |
79 IM.insert (edef, n, (all_ns, t, e))) edef vis) | 79 IM.insert (edef, n, (all_ns, t, e))) edef vis) |
80 end | 80 end |
81 | ((DExport _, _), acc) => acc | 81 | ((DExport _, _), acc) => acc |
82 | ((DTable (_, n, c, _, _), _), (cdef, edef)) => | 82 | ((DTable (_, n, c, _, _, _), _), (cdef, edef)) => |
83 (cdef, IM.insert (edef, n, ([], c, dummye))) | 83 (cdef, IM.insert (edef, n, ([], c, dummye))) |
84 | ((DSequence (_, n, _), _), (cdef, edef)) => | 84 | ((DSequence (_, n, _), _), (cdef, edef)) => |
85 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) | 85 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) |
86 | ((DDatabase _, _), acc) => acc | 86 | ((DDatabase _, _), acc) => acc |
87 | ((DCookie (_, n, c, _), _), (cdef, edef)) => | 87 | ((DCookie (_, n, c, _), _), (cdef, edef)) => |