147 |
val theValues = ref (NONE: kernelValues option) |
val theValues = ref (NONE: kernelValues option) |
148 |
|
|
149 |
in |
in |
150 |
fun setAnchor (a, s) = |
fun setAnchor { anchor = a, path = s } = |
151 |
(PathConfig.set (pcmode, a, s); SrcPath.sync ()) |
(PathConfig.set (pcmode, a, s); SrcPath.sync ()) |
152 |
(* cancelling anchors cannot affect the order of existing paths |
(* cancelling anchors cannot affect the order of existing paths |
153 |
* (it may invalidate some paths; but all other ones stay as |
* (it may invalidate some paths; but all other ones stay as |
156 |
(* same goes for reset because it just cancels all anchors... *) |
(* same goes for reset because it just cancels all anchors... *) |
157 |
fun resetPathConfig () = PathConfig.reset pcmode |
fun resetPathConfig () = PathConfig.reset pcmode |
158 |
|
|
159 |
fun showPending () = let |
fun getPending () = let |
160 |
fun one (s, _) = let |
fun one (s, _) = let |
161 |
val nss = Symbol.nameSpaceToString (Symbol.nameSpace s) |
val nss = Symbol.nameSpaceToString (Symbol.nameSpace s) |
162 |
val n = Symbol.name s |
val n = Symbol.name s |
163 |
in |
in |
164 |
Say.say [" ", nss, " ", n, "\n"] |
concat [" ", nss, " ", n, "\n"] |
165 |
end |
end |
166 |
in |
in |
167 |
SymbolMap.appi one (AutoLoad.getPending ()) |
map one (SymbolMap.listItemsi (AutoLoad.getPending ())) |
168 |
end |
end |
169 |
|
|
170 |
fun initPaths () = let |
fun initPaths () = let |
222 |
| SOME (g, gp) => f gp g |
| SOME (g, gp) => f gp g |
223 |
end |
end |
224 |
|
|
|
val listLibs = Parse.listLibs |
|
|
fun dismissLib l = let |
|
|
val c = SrcPath.cwdContext () |
|
|
val p = SrcPath.standard pcmode { context = c, spec = l } |
|
|
in |
|
|
Parse.dismissLib p |
|
|
end |
|
|
|
|
225 |
fun stabilize_runner gp g = true |
fun stabilize_runner gp g = true |
226 |
|
|
227 |
fun stabilize recursively = run (SOME recursively) stabilize_runner |
fun stabilize recursively = run (SOME recursively) stabilize_runner |
449 |
(HostMachDepVC.Interact.installCompManager |
(HostMachDepVC.Interact.installCompManager |
450 |
(SOME al_manager'); |
(SOME al_manager'); |
451 |
autoload "basis.cm"; |
autoload "basis.cm"; |
452 |
autoload "host-cm.cm"; |
autoload "minimal-cm.cm"; |
453 |
CmHook.init |
CmHook.init |
454 |
{ stabilize = stabilize, |
{ stabilize = stabilize, |
455 |
recomp = recomp, |
recomp = recomp, |
456 |
make = make, |
make = make, |
457 |
autoload = autoload, |
autoload = autoload }) |
|
reset = reset, |
|
|
verbose = StdConfig.verbose, |
|
|
debug = StdConfig.debug, |
|
|
keep_going = StdConfig.keep_going, |
|
|
warn_obsolete = StdConfig.warn_obsolete, |
|
|
parse_caching = StdConfig.parse_caching, |
|
|
setAnchor = setAnchor, |
|
|
cancelAnchor = cancelAnchor, |
|
|
resetPathConfig = resetPathConfig, |
|
|
synchronize = SrcPath.sync, |
|
|
showPending = showPending, |
|
|
listLibs = listLibs, |
|
|
dismissLib = dismissLib, |
|
|
symval = SSV.symval, |
|
|
server_start = |
|
|
fn x => (Servers.start x |
|
|
before SrcPath.invalidateCwd ()), |
|
|
server_stop = Servers.stop, |
|
|
server_kill = Servers.kill }) |
|
458 |
|
|
459 |
end |
end |
460 |
end |
end |
479 |
["@CMslave"] => (#set StdConfig.verbose false; slave ()) |
["@CMslave"] => (#set StdConfig.verbose false; slave ()) |
480 |
| l => app (p o c) l |
| l => app (p o c) l |
481 |
end |
end |
482 |
|
|
483 |
|
structure CM :> CM = struct |
484 |
|
type 'a controller = { get : unit -> 'a, set : 'a -> unit } |
485 |
|
|
486 |
|
structure Anchor = struct |
487 |
|
val set = setAnchor |
488 |
|
val cancel = cancelAnchor |
489 |
|
val reset = resetPathConfig |
490 |
|
end |
491 |
|
|
492 |
|
structure Control = struct |
493 |
|
val keep_going = StdConfig.keep_going |
494 |
|
val verbose = StdConfig.verbose |
495 |
|
val parse_caching = StdConfig.parse_caching |
496 |
|
val warn_obsolete = StdConfig.warn_obsolete |
497 |
|
val debug = StdConfig.debug |
498 |
|
end |
499 |
|
|
500 |
|
structure Library = struct |
501 |
|
type lib = SrcPath.t |
502 |
|
val known = Parse.listLibs |
503 |
|
val descr = SrcPath.descr |
504 |
|
val osstring = SrcPath.osstring |
505 |
|
val dismiss = Parse.dismissLib |
506 |
|
end |
507 |
|
|
508 |
|
structure State = struct |
509 |
|
val synchronize = SrcPath.sync |
510 |
|
val reset = reset |
511 |
|
val pending = getPending |
512 |
|
end |
513 |
|
|
514 |
|
structure Server = struct |
515 |
|
type server = Servers.server |
516 |
|
fun start x = Servers.start x before SrcPath.invalidateCwd () |
517 |
|
val stop = Servers.stop |
518 |
|
val kill = Servers.kill |
519 |
|
val name = Servers.name |
520 |
|
end |
521 |
|
|
522 |
|
val autoload = autoload |
523 |
|
val make = make |
524 |
|
val recomp = recomp |
525 |
|
val stabilize = stabilize |
526 |
|
|
527 |
|
val symval = SSV.symval |
528 |
|
end |
529 |
end |
end |
530 |
end |
end |