equal
deleted
inserted
replaced
14 val init: string -> theory -> local_theory |
14 val init: string -> theory -> local_theory |
15 val init': {setup: local_theory -> local_theory, conclude: local_theory -> local_theory} -> |
15 val init': {setup: local_theory -> local_theory, conclude: local_theory -> local_theory} -> |
16 string -> theory -> local_theory |
16 string -> theory -> local_theory |
17 val theory_init: theory -> local_theory |
17 val theory_init: theory -> local_theory |
18 val theory_map: (local_theory -> local_theory) -> theory -> theory |
18 val theory_map: (local_theory -> local_theory) -> theory -> theory |
|
19 val theory_map_result: (morphism -> 'a -> 'b) -> (local_theory -> 'a * local_theory) -> |
|
20 theory -> 'b * theory |
19 val begin: xstring * Position.T -> theory -> local_theory |
21 val begin: xstring * Position.T -> theory -> local_theory |
20 val exit: local_theory -> theory |
22 val exit: local_theory -> theory |
21 val switch: (xstring * Position.T) option -> Context.generic -> |
23 val switch: (xstring * Position.T) option -> Context.generic -> |
22 (local_theory -> Context.generic) * local_theory |
24 (local_theory -> Context.generic) * local_theory |
23 end; |
25 end; |
133 fun init ident thy = |
135 fun init ident thy = |
134 init' {setup = Data.put (SOME (target_of_ident thy ident)), conclude = I} ident thy; |
136 init' {setup = Data.put (SOME (target_of_ident thy ident)), conclude = I} ident thy; |
135 |
137 |
136 val theory_init = init ""; |
138 val theory_init = init ""; |
137 |
139 |
138 fun theory_map f = theory_init #> f #> Local_Theory.exit_global; |
140 fun theory_map g = theory_init #> g #> Local_Theory.exit_global; |
|
141 |
|
142 fun theory_map_result f g = theory_init #> g #> Local_Theory.exit_result_global f; |
139 |
143 |
140 |
144 |
141 (* toplevel interaction *) |
145 (* toplevel interaction *) |
142 |
146 |
143 fun begin ("-", _) thy = theory_init thy |
147 fun begin ("-", _) thy = theory_init thy |