src/Pure/Pure.thy
changeset 72747 5f9d66155081
parent 72536 589645894305
child 72749 38d001186621
equal deleted inserted replaced
72746:049a71febf05 72747:5f9d66155081
   109 
   109 
   110 ML \<open>
   110 ML \<open>
   111 local
   111 local
   112   val _ =
   112   val _ =
   113     Outer_Syntax.command \<^command_keyword>\<open>external_file\<close> "formal dependency on external file"
   113     Outer_Syntax.command \<^command_keyword>\<open>external_file\<close> "formal dependency on external file"
   114       (Resources.provide_parse_files "external_file" >> (fn files => Toplevel.theory (#2 o files)));
   114       (Resources.provide_parse_file >> (fn get_file => Toplevel.theory (#2 o get_file)));
   115 
   115 
   116   val _ =
   116   val _ =
   117     Outer_Syntax.command \<^command_keyword>\<open>bibtex_file\<close> "check bibtex database file in Prover IDE"
   117     Outer_Syntax.command \<^command_keyword>\<open>bibtex_file\<close> "check bibtex database file in Prover IDE"
   118       (Resources.provide_parse_files "bibtex_file" >> (fn files =>
   118       (Resources.provide_parse_file >> (fn get_file =>
   119         Toplevel.theory (fn thy =>
   119         Toplevel.theory (fn thy =>
   120           let
   120           let
   121             val ([{lines, pos, ...}], thy') = files thy;
   121             val ({lines, pos, ...}, thy') = get_file thy;
   122             val _ = Bibtex.check_database_output pos (cat_lines lines);
   122             val _ = Bibtex.check_database_output pos (cat_lines lines);
   123           in thy' end)));
   123           in thy' end)));
   124 
   124 
   125   val _ =
   125   val _ =
   126     Outer_Syntax.local_theory \<^command_keyword>\<open>generate_file\<close>
   126     Outer_Syntax.local_theory \<^command_keyword>\<open>generate_file\<close>
   175 
   175 
   176 val semi = Scan.option \<^keyword>\<open>;\<close>;
   176 val semi = Scan.option \<^keyword>\<open>;\<close>;
   177 
   177 
   178 val _ =
   178 val _ =
   179   Outer_Syntax.command \<^command_keyword>\<open>ML_file\<close> "read and evaluate Isabelle/ML file"
   179   Outer_Syntax.command \<^command_keyword>\<open>ML_file\<close> "read and evaluate Isabelle/ML file"
   180     (Resources.parse_files "ML_file" --| semi >> ML_File.ML NONE);
   180     (Resources.parse_file --| semi >> ML_File.ML NONE);
   181 
   181 
   182 val _ =
   182 val _ =
   183   Outer_Syntax.command \<^command_keyword>\<open>ML_file_debug\<close>
   183   Outer_Syntax.command \<^command_keyword>\<open>ML_file_debug\<close>
   184     "read and evaluate Isabelle/ML file (with debugger information)"
   184     "read and evaluate Isabelle/ML file (with debugger information)"
   185     (Resources.parse_files "ML_file_debug" --| semi >> ML_File.ML (SOME true));
   185     (Resources.parse_file --| semi >> ML_File.ML (SOME true));
   186 
   186 
   187 val _ =
   187 val _ =
   188   Outer_Syntax.command \<^command_keyword>\<open>ML_file_no_debug\<close>
   188   Outer_Syntax.command \<^command_keyword>\<open>ML_file_no_debug\<close>
   189     "read and evaluate Isabelle/ML file (no debugger information)"
   189     "read and evaluate Isabelle/ML file (no debugger information)"
   190     (Resources.parse_files "ML_file_no_debug" --| semi >> ML_File.ML (SOME false));
   190     (Resources.parse_file --| semi >> ML_File.ML (SOME false));
   191 
   191 
   192 val _ =
   192 val _ =
   193   Outer_Syntax.command \<^command_keyword>\<open>SML_file\<close> "read and evaluate Standard ML file"
   193   Outer_Syntax.command \<^command_keyword>\<open>SML_file\<close> "read and evaluate Standard ML file"
   194     (Resources.parse_files "SML_file" --| semi >> ML_File.SML NONE);
   194     (Resources.parse_file --| semi >> ML_File.SML NONE);
   195 
   195 
   196 val _ =
   196 val _ =
   197   Outer_Syntax.command \<^command_keyword>\<open>SML_file_debug\<close>
   197   Outer_Syntax.command \<^command_keyword>\<open>SML_file_debug\<close>
   198     "read and evaluate Standard ML file (with debugger information)"
   198     "read and evaluate Standard ML file (with debugger information)"
   199     (Resources.parse_files "SML_file_debug" --| semi >> ML_File.SML (SOME true));
   199     (Resources.parse_file --| semi >> ML_File.SML (SOME true));
   200 
   200 
   201 val _ =
   201 val _ =
   202   Outer_Syntax.command \<^command_keyword>\<open>SML_file_no_debug\<close>
   202   Outer_Syntax.command \<^command_keyword>\<open>SML_file_no_debug\<close>
   203     "read and evaluate Standard ML file (no debugger information)"
   203     "read and evaluate Standard ML file (no debugger information)"
   204     (Resources.parse_files "SML_file_no_debug" --| semi >> ML_File.SML (SOME false));
   204     (Resources.parse_file --| semi >> ML_File.SML (SOME false));
   205 
   205 
   206 val _ =
   206 val _ =
   207   Outer_Syntax.command \<^command_keyword>\<open>SML_export\<close> "evaluate SML within Isabelle/ML environment"
   207   Outer_Syntax.command \<^command_keyword>\<open>SML_export\<close> "evaluate SML within Isabelle/ML environment"
   208     (Parse.ML_source >> (fn source =>
   208     (Parse.ML_source >> (fn source =>
   209       let
   209       let