Mercurial > urweb
comparison src/shake.sml @ 1075:0657e5adc938
Convert to task syntax
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 15 Dec 2009 10:19:05 -0500 |
parents | b2311dfb3158 |
children | a4979e31e4bf |
comparison
equal
deleted
inserted
replaced
1074:d89f98f0b4bb | 1075:0657e5adc938 |
---|---|
77 val (usedE, usedC) = usedVars (usedE, usedC) pe | 77 val (usedE, usedC) = usedVars (usedE, usedC) pe |
78 val (usedE, usedC) = usedVars (usedE, usedC) ce | 78 val (usedE, usedC) = usedVars (usedE, usedC) ce |
79 in | 79 in |
80 (usedE, usedC) | 80 (usedE, usedC) |
81 end | 81 end |
82 | ((DInitializer e, _), st) => usedVars st e | 82 | ((DTask (e1, e2), _), st) => usedVars (usedVars st e1) e2 |
83 | (_, acc) => acc) (IS.empty, IS.empty) file | 83 | (_, acc) => acc) (IS.empty, IS.empty) file |
84 | 84 |
85 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) | 85 val (cdef, edef) = foldl (fn ((DCon (_, n, _, c), _), (cdef, edef)) => (IM.insert (cdef, n, [c]), edef) |
86 | ((DDatatype dts, _), (cdef, edef)) => | 86 | ((DDatatype dts, _), (cdef, edef)) => |
87 (foldl (fn ((_, n, _, xncs), cdef) => | 87 (foldl (fn ((_, n, _, xncs), cdef) => |
104 | ((DDatabase _, _), acc) => acc | 104 | ((DDatabase _, _), acc) => acc |
105 | ((DCookie (_, n, c, _), _), (cdef, edef)) => | 105 | ((DCookie (_, n, c, _), _), (cdef, edef)) => |
106 (cdef, IM.insert (edef, n, ([], c, dummye))) | 106 (cdef, IM.insert (edef, n, ([], c, dummye))) |
107 | ((DStyle (_, n, _), _), (cdef, edef)) => | 107 | ((DStyle (_, n, _), _), (cdef, edef)) => |
108 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) | 108 (cdef, IM.insert (edef, n, ([], dummyt, dummye))) |
109 | ((DInitializer _, _), acc) => acc) | 109 | ((DTask _, _), acc) => acc) |
110 (IM.empty, IM.empty) file | 110 (IM.empty, IM.empty) file |
111 | 111 |
112 fun kind (_, s) = s | 112 fun kind (_, s) = s |
113 | 113 |
114 fun con (c, s) = | 114 fun con (c, s) = |
184 | (DSequence _, _) => true | 184 | (DSequence _, _) => true |
185 | (DTable _, _) => true | 185 | (DTable _, _) => true |
186 | (DDatabase _, _) => true | 186 | (DDatabase _, _) => true |
187 | (DCookie _, _) => true | 187 | (DCookie _, _) => true |
188 | (DStyle _, _) => true | 188 | (DStyle _, _) => true |
189 | (DInitializer _, _) => true) file | 189 | (DTask _, _) => true) file |
190 end | 190 end |
191 | 191 |
192 end | 192 end |