equal
deleted
inserted
replaced
16 (fn () => Thy_Info.toplevel_begin_theory (! ProofGeneral.master_path) header))); |
16 (fn () => Thy_Info.toplevel_begin_theory (! ProofGeneral.master_path) header))); |
17 |
17 |
18 val _ = |
18 val _ = |
19 Outer_Syntax.command |
19 Outer_Syntax.command |
20 (("ML_file", Keyword.tag_ml Keyword.thy_load), @{here}) "ML text from file" |
20 (("ML_file", Keyword.tag_ml Keyword.thy_load), @{here}) "ML text from file" |
21 (Thy_Load.parse_files "ML_file" >> (fn files => Toplevel.generic_theory (fn gthy => |
21 (Resources.parse_files "ML_file" >> (fn files => Toplevel.generic_theory (fn gthy => |
22 let |
22 let |
23 val [{src_path, lines, digest, pos}] = files (Context.theory_of gthy); |
23 val [{src_path, lines, digest, pos}] = files (Context.theory_of gthy); |
24 val provide = Thy_Load.provide (src_path, digest); |
24 val provide = Resources.provide (src_path, digest); |
25 val source = {delimited = true, text = cat_lines lines, pos = pos}; |
25 val source = {delimited = true, text = cat_lines lines, pos = pos}; |
26 in |
26 in |
27 gthy |
27 gthy |
28 |> ML_Context.exec (fn () => ML_Context.eval_source true source) |
28 |> ML_Context.exec (fn () => ML_Context.eval_source true source) |
29 |> Local_Theory.propagate_ml_env |
29 |> Local_Theory.propagate_ml_env |