Mercurial > urweb
comparison src/shake.sml @ 1199:c316ca3c9ec6
Pushing policies through
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 04 Apr 2010 12:29:34 -0400 |
parents | 7a31e0cf25e9 |
children | e8d68fd8ed4b |
comparison
equal
deleted
inserted
replaced
1197:6d8e3dcb9713 | 1199:c316ca3c9ec6 |
---|---|
88 | ((DTask (e1, e2), _), st) => | 88 | ((DTask (e1, e2), _), st) => |
89 if !sliceDb then | 89 if !sliceDb then |
90 st | 90 st |
91 else | 91 else |
92 usedVars (usedVars st e1) e2 | 92 usedVars (usedVars st e1) e2 |
93 | ((DPolicy e1, _), st) => | |
94 if !sliceDb then | |
95 st | |
96 else | |
97 usedVars st e1 | |
93 | (_, acc) => acc) (IS.empty, IS.empty) file | 98 | (_, acc) => acc) (IS.empty, IS.empty) file |
94 | 99 |
95 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) | 100 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) |
96 | ((DDatatype dts, _), (cdef, edef)) => | 101 | ((DDatatype dts, _), (cdef, edef)) => |
97 (foldl (fn ((_, n, _, xncs), cdef) => | 102 (foldl (fn ((_, n, _, xncs), cdef) => |
114 | ((DDatabase _, _), acc) => acc | 119 | ((DDatabase _, _), acc) => acc |
115 | ((DCookie (_, n, c, _), _), (cdef, edef)) => | 120 | ((DCookie (_, n, c, _), _), (cdef, edef)) => |
116 (cdef, IM.insert (edef, n, ([], c, dummye))) | 121 (cdef, IM.insert (edef, n, ([], c, dummye))) |
117 | ((DStyle (_, n, _), _), (cdef, edef)) => | 122 | ((DStyle (_, n, _), _), (cdef, edef)) => |
118 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) | 123 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) |
119 | ((DTask _, _), acc) => acc) | 124 | ((DTask _, _), acc) => acc |
125 | ((DPolicy _, _), acc) => acc) | |
120 (IM.empty, IM.empty) file | 126 (IM.empty, IM.empty) file |
121 | 127 |
122 fun kind (_, s) = s | 128 fun kind (_, s) = s |
123 | 129 |
124 fun con (c, s) = | 130 fun con (c, s) = |
201 | (DSequence _, _) => true | 207 | (DSequence _, _) => true |
202 | (DTable _, _) => true | 208 | (DTable _, _) => true |
203 | (DDatabase _, _) => not (!sliceDb) | 209 | (DDatabase _, _) => not (!sliceDb) |
204 | (DCookie _, _) => not (!sliceDb) | 210 | (DCookie _, _) => not (!sliceDb) |
205 | (DStyle _, _) => not (!sliceDb) | 211 | (DStyle _, _) => not (!sliceDb) |
206 | (DTask _, _) => not (!sliceDb)) file | 212 | (DTask _, _) => not (!sliceDb) |
213 | (DPolicy _, _) => not (!sliceDb)) file | |
207 end | 214 end |
208 | 215 |
209 end | 216 end |