equal
deleted
inserted
replaced
156 val begin_theory: string -> string list -> (string * bool) list -> theory |
156 val begin_theory: string -> string list -> (string * bool) list -> theory |
157 val end_theory: theory -> theory |
157 val end_theory: theory -> theory |
158 val kill_theory: string -> unit |
158 val kill_theory: string -> unit |
159 val theory: string * string list * (string * bool) list |
159 val theory: string * string list * (string * bool) list |
160 -> Toplevel.transition -> Toplevel.transition |
160 -> Toplevel.transition -> Toplevel.transition |
|
161 val init_context: (string -> unit) -> string -> Toplevel.transition -> Toplevel.transition |
161 val context: string -> Toplevel.transition -> Toplevel.transition |
162 val context: string -> Toplevel.transition -> Toplevel.transition |
162 end; |
163 end; |
163 |
164 |
164 structure IsarThy: ISAR_THY = |
165 structure IsarThy: ISAR_THY = |
165 struct |
166 struct |
534 fun theory spec = Toplevel.init_theory (bg_theory spec) en_theory (kill_theory o PureThy.get_name); |
535 fun theory spec = Toplevel.init_theory (bg_theory spec) en_theory (kill_theory o PureThy.get_name); |
535 |
536 |
536 |
537 |
537 (* context switch *) |
538 (* context switch *) |
538 |
539 |
539 fun context name = |
540 fun init_context (f: string -> unit) name = |
540 Toplevel.init_theory (fn _ => (the (#2 (Context.pass None ThyInfo.quiet_update_thy name)))) |
541 Toplevel.init_theory (fn _ => (the (#2 (Context.pass None f name)))) (K ()) (K ()); |
541 (K ()) (K ()); |
542 |
|
543 val context = init_context (ThyInfo.quiet_update_thy true); |
542 |
544 |
543 |
545 |
544 end; |
546 end; |