equal
deleted
inserted
replaced
203 |
203 |
204 |
204 |
205 (* init and exit *) |
205 (* init and exit *) |
206 |
206 |
207 fun begin loc = |
207 fun begin loc = |
|
208 Data.put (if loc = "" then NONE else SOME loc) #> |
208 LocalTheory.init (SOME (NameSpace.base loc)) |
209 LocalTheory.init (SOME (NameSpace.base loc)) |
209 {pretty = pretty loc, |
210 {pretty = pretty loc, |
210 consts = consts loc, |
211 consts = consts loc, |
211 axioms = axioms, |
212 axioms = axioms, |
212 defs = defs, |
213 defs = defs, |
213 notes = notes loc, |
214 notes = notes loc, |
214 term_syntax = term_syntax loc, |
215 term_syntax = term_syntax loc, |
215 declaration = declaration loc, |
216 declaration = declaration loc, |
216 exit = K I} |
217 exit = K I}; |
217 #> Data.put (SOME loc); |
|
218 |
218 |
219 fun init_i NONE thy = begin "" (ProofContext.init thy) |
219 fun init_i NONE thy = begin "" (ProofContext.init thy) |
220 | init_i (SOME loc) thy = begin loc (Locale.init loc thy); |
220 | init_i (SOME loc) thy = begin loc (Locale.init loc thy); |
221 |
221 |
222 fun init loc thy = init_i (Option.map (Locale.intern thy) loc) thy; |
222 fun init loc thy = init_i (Option.map (Locale.intern thy) loc) thy; |