equal
deleted
inserted
replaced
86 |
86 |
87 fun value ctxt (get, put, put_ml) (prelude, value) = |
87 fun value ctxt (get, put, put_ml) (prelude, value) = |
88 let |
88 let |
89 val code = (prelude |
89 val code = (prelude |
90 ^ "\nval _ = Context.set_thread_data (SOME (Context.map_proof (" ^ put_ml |
90 ^ "\nval _ = Context.set_thread_data (SOME (Context.map_proof (" ^ put_ml |
91 ^ " (fn () => " ^ value ^ ")) (ML_Context.the_generic_context ())))"); |
91 ^ " (fn () => " ^ value ^ ")) (Context.the_generic_context ())))"); |
92 val ctxt' = ctxt |
92 val ctxt' = ctxt |
93 |> put (fn () => error ("Bad evaluation for " ^ quote put_ml)) |
93 |> put (fn () => error ("Bad evaluation for " ^ quote put_ml)) |
94 |> Context.proof_map (exec ctxt false code); |
94 |> Context.proof_map (exec ctxt false code); |
95 in get ctxt' () end; |
95 in get ctxt' () end; |
96 |
96 |
537 val _ = Context.set_thread_data ((SOME o Context.Theory) thy'); |
537 val _ = Context.set_thread_data ((SOME o Context.Theory) thy'); |
538 val _ = |
538 val _ = |
539 ML_Compiler0.use_text notifying_context |
539 ML_Compiler0.use_text notifying_context |
540 {line = 0, file = Path.implode filepath, verbose = false, debug = false} |
540 {line = 0, file = Path.implode filepath, verbose = false, debug = false} |
541 (File.read filepath); |
541 (File.read filepath); |
542 val thy'' = Context.the_theory (Context.the_thread_data ()); |
542 val thy'' = Context.the_global_context (); |
543 val names = Loaded_Values.get thy''; |
543 val names = Loaded_Values.get thy''; |
544 in (names, thy'') end; |
544 in (names, thy'') end; |
545 |
545 |
546 end; |
546 end; |
547 |
547 |