31 |
|
|
32 |
fun start () = (CT.start (), ref SmlInfoMap.empty) |
fun start () = (CT.start (), ref SmlInfoMap.empty) |
33 |
fun finish (ctts, _) = CT.finish ctts |
fun finish (ctts, _) = CT.finish ctts |
34 |
|
fun clearErrors (_, smlcache) = |
35 |
|
smlcache := SmlInfoMap.filter isSome (!smlcache) |
36 |
|
|
37 |
|
fun clearStableErrors () = |
38 |
|
stablecache := StableMap.filter isSome (!stablecache) |
39 |
|
|
40 |
(* To implement "keep_going" we have two different ways of |
(* To implement "keep_going" we have two different ways of |
41 |
* combining a "work" function with a "layer" function. |
* combining a "work" function with a "layer" function. |
124 |
Option.map CT.env2result (farsbnode ts gp n) |
Option.map CT.env2result (farsbnode ts gp n) |
125 |
before finish ts |
before finish ts |
126 |
|
|
127 |
|
(* Only "resume" and "group" clear stable errors; other |
128 |
|
* traversals must wait until "resume" or "group" has been |
129 |
|
* re-run. *) |
130 |
fun resume getter gp m = |
fun resume getter gp m = |
131 |
|
(clearStableErrors (); |
132 |
|
SymbolMap.app (clearErrors o #2 o getter) m; |
133 |
foldl (layerwork (#keep_going (#param gp), |
foldl (layerwork (#keep_going (#param gp), |
134 |
CT.rlayer, |
CT.rlayer, |
135 |
resume1 gp o getter)) |
resume1 gp o getter)) |
136 |
(SOME CT.empty) |
(SOME CT.empty) |
137 |
(SymbolMap.listItems m) |
(SymbolMap.listItems m)) |
138 |
|
|
139 |
fun group gp (GG.GROUP { exports, ... }) = let |
fun group gp (GG.GROUP { exports, ... }) = let |
140 |
val ts = start () |
val ts = start () |