10 val inherit: Context.generic -> Context.generic -> Context.generic |
10 val inherit: Context.generic -> Context.generic -> Context.generic |
11 val forget_structure: string -> Context.generic -> Context.generic |
11 val forget_structure: string -> Context.generic -> Context.generic |
12 val add_breakpoint: serial * (bool Unsynchronized.ref * Position.T) -> |
12 val add_breakpoint: serial * (bool Unsynchronized.ref * Position.T) -> |
13 Context.generic -> Context.generic |
13 Context.generic -> Context.generic |
14 val get_breakpoint: Context.generic -> serial -> (bool Unsynchronized.ref * Position.T) option |
14 val get_breakpoint: Context.generic -> serial -> (bool Unsynchronized.ref * Position.T) option |
|
15 val init_bootstrap: Context.generic -> Context.generic |
15 val add_name_space: {SML: bool} -> ML_Name_Space.T -> Context.generic -> Context.generic |
16 val add_name_space: {SML: bool} -> ML_Name_Space.T -> Context.generic -> Context.generic |
16 val make_name_space: {SML: bool, exchange: bool} -> ML_Name_Space.T |
17 val make_name_space: {SML: bool, exchange: bool} -> ML_Name_Space.T |
17 val context: ML_Compiler0.context |
18 val context: ML_Compiler0.context |
18 val name_space: ML_Name_Space.T |
19 val name_space: ML_Name_Space.T |
19 val check_functor: string -> unit |
20 val check_functor: string -> unit |
89 |
90 |
90 val get_breakpoint = Inttab.lookup o #breakpoints o Env.get; |
91 val get_breakpoint = Inttab.lookup o #breakpoints o Env.get; |
91 |
92 |
92 |
93 |
93 (* name space *) |
94 (* name space *) |
|
95 |
|
96 val init_bootstrap = |
|
97 Env.map (fn {bootstrap, tables, sml_tables, breakpoints} => |
|
98 let |
|
99 val sml_tables' = |
|
100 sml_tables |> (fn (val1, type1, fixity1, structure1, signature1, functor1) => |
|
101 let |
|
102 val val2 = |
|
103 fold (fn (x, y) => |
|
104 member (op =) ML_Name_Space.excluded_values x ? Symtab.update (x, y)) |
|
105 (#allVal ML_Name_Space.global ()) val1; |
|
106 val structure2 = |
|
107 fold (fn (x, y) => |
|
108 member (op =) ML_Name_Space.excluded_structures x ? Symtab.update (x, y)) |
|
109 (#allStruct ML_Name_Space.global ()) structure1; |
|
110 in (val2, type1, fixity1, structure2, signature1, functor1) end); |
|
111 in make_data (bootstrap, tables, sml_tables', breakpoints) end); |
94 |
112 |
95 fun add_name_space {SML} (space: ML_Name_Space.T) = |
113 fun add_name_space {SML} (space: ML_Name_Space.T) = |
96 Env.map (fn {bootstrap, tables, sml_tables, breakpoints} => |
114 Env.map (fn {bootstrap, tables, sml_tables, breakpoints} => |
97 let |
115 let |
98 val (tables', sml_tables') = |
116 val (tables', sml_tables') = |