10 |
|
|
11 |
structure E = GenericVC.Environment |
structure E = GenericVC.Environment |
12 |
structure SE = GenericVC.StaticEnv |
structure SE = GenericVC.StaticEnv |
13 |
|
structure ER = GenericVC.EnvRef |
14 |
|
structure BE = GenericVC.BareEnvironment |
15 |
structure CMSE = GenericVC.CMStaticEnv |
structure CMSE = GenericVC.CMStaticEnv |
16 |
structure S = GenericVC.Symbol |
structure S = GenericVC.Symbol |
17 |
|
|
53 |
ExecTraversal.group gp g |
ExecTraversal.group gp g |
54 |
before FullPersstate.rememberShared ()) |
before FullPersstate.rememberShared ()) |
55 |
|
|
56 |
fun make_group gp g = |
fun recomp_runner gp g = isSome (recomp_group gp g) |
57 |
if isSome (recomp_group gp g) then exec_group gp g else NONE |
|
58 |
|
fun make_runner gp g = |
59 |
|
case recomp_group gp g of |
60 |
|
NONE => false |
61 |
|
| SOME { stat, sym} => |
62 |
|
(case exec_group gp g of |
63 |
|
NONE => false |
64 |
|
| SOME dyn => let |
65 |
|
val delta = E.mkenv { static = stat, symbolic = sym, |
66 |
|
dynamic = dyn } |
67 |
|
val base = #get ER.topLevel () |
68 |
|
val new = BE.concatEnv (ER.unCMenv delta, base) |
69 |
|
in |
70 |
|
#set ER.topLevel new; |
71 |
|
Say.vsay ["[New bindings added.]\n"]; |
72 |
|
true |
73 |
|
end) |
74 |
|
|
75 |
structure Stabilize = StabilizeFn (val bn2statenv = bn2statenv |
structure Stabilize = StabilizeFn (val bn2statenv = bn2statenv |
76 |
fun recomp gp g = |
val recomp = recomp_runner) |
|
isSome (recomp_group gp g)) |
|
77 |
|
|
78 |
structure Parse = ParseFn (structure Stabilize = Stabilize) |
structure Parse = ParseFn (structure Stabilize = Stabilize) |
79 |
|
|
80 |
|
fun stabilize_runner gp g = true |
81 |
in |
in |
82 |
structure CM = struct |
structure CM = struct |
83 |
|
|
86 |
val p = AbsPath.native { context = AbsPath.cwdContext (), |
val p = AbsPath.native { context = AbsPath.cwdContext (), |
87 |
spec = s } |
spec = s } |
88 |
val { mod = basis, nomod = perv } = |
val { mod = basis, nomod = perv } = |
89 |
split (#get GenericVC.EnvRef.pervasive ()) |
split (#get ER.pervasive ()) |
90 |
val corenv = #get GenericVC.EnvRef.core () |
val corenv = #get ER.core () |
91 |
val primconf = Primitive.configuration { basis = basis } |
val primconf = Primitive.configuration { basis = basis } |
92 |
val param = { primconf = primconf, |
val param = { primconf = primconf, |
93 |
fnpolicy = FilenamePolicy.default, |
fnpolicy = FilenamePolicy.default, |
96 |
corenv = corenv } |
corenv = corenv } |
97 |
in |
in |
98 |
case Parse.parse param sflag p of |
case Parse.parse param sflag p of |
99 |
NONE => NONE |
NONE => false |
100 |
| SOME (g, gp) => f gp g |
| SOME (g, gp) => f gp g |
101 |
end |
end |
102 |
|
|
103 |
fun stabilize recursively = |
fun stabilize recursively = run (SOME recursively) stabilize_runner |
104 |
run (SOME recursively) (fn _ => fn _ => SOME ()) |
val recomp = run NONE recomp_runner |
105 |
val recomp = run NONE recomp_group |
val make = run NONE make_runner |
|
val make = run NONE make_group |
|
106 |
end |
end |
107 |
|
|
108 |
structure CMB = struct |
structure CMB = struct |