108 |
val _ = pending := pend |
val _ = pending := pend |
109 |
val (dae, _) = Statenv2DAEnv.cvt ste |
val (dae, _) = Statenv2DAEnv.cvt ste |
110 |
val load = ref SymbolMap.empty |
val load = ref SymbolMap.empty |
111 |
|
val announce = let |
112 |
|
val announced = ref false |
113 |
|
in |
114 |
|
fn () => |
115 |
|
(if !announced then () |
116 |
|
else (announced := true; |
117 |
|
Say.say ["[autoloading]\n"])) |
118 |
|
end |
119 |
fun lookpend sy = let |
fun lookpend sy = let |
120 |
fun otherwise _ = EM.impossible "Autoload:lookpend" |
fun otherwise _ = EM.impossible "Autoload:lookpend" |
121 |
in |
in |
122 |
case SymbolMap.find (pend, sy) of |
case SymbolMap.find (pend, sy) of |
123 |
SOME (x as ((_, e), _)) => |
SOME (x as ((_, e), _)) => |
124 |
(load := SymbolMap.insert (!load, sy, x); |
(announce (); |
125 |
|
load := SymbolMap.insert (!load, sy, x); |
126 |
BuildDepend.look otherwise e sy) |
BuildDepend.look otherwise e sy) |
127 |
| NONE => DAEnv.EMPTY |
| NONE => DAEnv.EMPTY |
128 |
end |
end |
165 |
in |
in |
166 |
if SymbolMap.isEmpty loadmap then () |
if SymbolMap.isEmpty loadmap then () |
167 |
else |
else |
168 |
(Say.say ["[autoloading]\n"]; |
(SrcPath.revalidateCwd (); |
|
SrcPath.revalidateCwd (); |
|
169 |
(* We temporarily turn verbosity off, so we need to wrap this |
(* We temporarily turn verbosity off, so we need to wrap this |
170 |
* with a SafeIO.perform... *) |
* with a SafeIO.perform... *) |
171 |
SafeIO.perform |
SafeIO.perform |