Mercurial > urweb
comparison src/shake.sml @ 1294:b4480a56cab7
Server-side 'onError'
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Tue, 07 Sep 2010 08:28:07 -0400 |
parents | e8d68fd8ed4b |
children | e15234fbb163 |
comparison
equal
deleted
inserted
replaced
1293:acabf3935060 | 1294:b4480a56cab7 |
---|---|
99 | ((DPolicy e1, _), st) => | 99 | ((DPolicy e1, _), st) => |
100 if !sliceDb then | 100 if !sliceDb then |
101 st | 101 st |
102 else | 102 else |
103 usedVars st e1 | 103 usedVars st e1 |
104 | ((DOnError n, _), st as (usedE, usedC)) => | |
105 if !sliceDb then | |
106 st | |
107 else | |
108 (IS.add (usedE, n), usedC) | |
104 | (_, acc) => acc) (IS.empty, IS.empty) file | 109 | (_, acc) => acc) (IS.empty, IS.empty) file |
105 | 110 |
106 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) | 111 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) |
107 | ((DDatatype dts, _), (cdef, edef)) => | 112 | ((DDatatype dts, _), (cdef, edef)) => |
108 (foldl (fn ((_, n, _, xncs), cdef) => | 113 (foldl (fn ((_, n, _, xncs), cdef) => |
126 | ((DCookie (_, n, c, _), _), (cdef, edef)) => | 131 | ((DCookie (_, n, c, _), _), (cdef, edef)) => |
127 (cdef, IM.insert (edef, n, ([], c, dummye))) | 132 (cdef, IM.insert (edef, n, ([], c, dummye))) |
128 | ((DStyle (_, n, _), _), (cdef, edef)) => | 133 | ((DStyle (_, n, _), _), (cdef, edef)) => |
129 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) | 134 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) |
130 | ((DTask _, _), acc) => acc | 135 | ((DTask _, _), acc) => acc |
131 | ((DPolicy _, _), acc) => acc) | 136 | ((DPolicy _, _), acc) => acc |
137 | ((DOnError _, _), acc) => acc) | |
132 (IM.empty, IM.empty) file | 138 (IM.empty, IM.empty) file |
133 | 139 |
134 fun kind (_, s) = s | 140 fun kind (_, s) = s |
135 | 141 |
136 fun con (c, s) = | 142 fun con (c, s) = |
214 | (DTable _, _) => true | 220 | (DTable _, _) => true |
215 | (DDatabase _, _) => not (!sliceDb) | 221 | (DDatabase _, _) => not (!sliceDb) |
216 | (DCookie _, _) => not (!sliceDb) | 222 | (DCookie _, _) => not (!sliceDb) |
217 | (DStyle _, _) => not (!sliceDb) | 223 | (DStyle _, _) => not (!sliceDb) |
218 | (DTask _, _) => not (!sliceDb) | 224 | (DTask _, _) => not (!sliceDb) |
219 | (DPolicy _, _) => not (!sliceDb)) file | 225 | (DPolicy _, _) => not (!sliceDb) |
226 | (DOnError _, _) => not (!sliceDb)) file | |
220 end | 227 end |
221 | 228 |
222 end | 229 end |