src/Pure/Pure.thy
changeset 74887 56247fdb8bbb
parent 74601 b7804cff55d9
child 75660 45d3497c0baa
equal deleted inserted replaced
74886:fa5476c54731 74887:56247fdb8bbb
   299       (fn (x, y) => Toplevel.theory (Isar_Cmd.oracle x y)));
   299       (fn (x, y) => Toplevel.theory (Isar_Cmd.oracle x y)));
   300 
   300 
   301 val _ =
   301 val _ =
   302   Outer_Syntax.local_theory \<^command_keyword>\<open>attribute_setup\<close> "define attribute in ML"
   302   Outer_Syntax.local_theory \<^command_keyword>\<open>attribute_setup\<close> "define attribute in ML"
   303     (Parse.name_position --
   303     (Parse.name_position --
   304         Parse.!!! (\<^keyword>\<open>=\<close> |-- Parse.ML_source -- Scan.optional Parse.text "")
   304         Parse.!!! (\<^keyword>\<open>=\<close> |-- Parse.ML_source -- Scan.optional Parse.embedded "")
   305       >> (fn (name, (txt, cmt)) => Attrib.attribute_setup name txt cmt));
   305       >> (fn (name, (txt, cmt)) => Attrib.attribute_setup name txt cmt));
   306 
   306 
   307 val _ =
   307 val _ =
   308   Outer_Syntax.local_theory \<^command_keyword>\<open>method_setup\<close> "define proof method in ML"
   308   Outer_Syntax.local_theory \<^command_keyword>\<open>method_setup\<close> "define proof method in ML"
   309     (Parse.name_position --
   309     (Parse.name_position --
   310         Parse.!!! (\<^keyword>\<open>=\<close> |-- Parse.ML_source -- Scan.optional Parse.text "")
   310         Parse.!!! (\<^keyword>\<open>=\<close> |-- Parse.ML_source -- Scan.optional Parse.embedded "")
   311       >> (fn (name, (txt, cmt)) => Method.method_setup name txt cmt));
   311       >> (fn (name, (txt, cmt)) => Method.method_setup name txt cmt));
   312 
   312 
   313 val _ =
   313 val _ =
   314   Outer_Syntax.local_theory \<^command_keyword>\<open>declaration\<close> "generic ML declaration"
   314   Outer_Syntax.local_theory \<^command_keyword>\<open>declaration\<close> "generic ML declaration"
   315     (Parse.opt_keyword "pervasive" -- Parse.ML_source
   315     (Parse.opt_keyword "pervasive" -- Parse.ML_source
   570           #2 oo Specification.theorems_cmd "" [(Binding.empty_atts, flat facts)] fixes));
   570           #2 oo Specification.theorems_cmd "" [(Binding.empty_atts, flat facts)] fixes));
   571 
   571 
   572 val _ =
   572 val _ =
   573   Outer_Syntax.local_theory \<^command_keyword>\<open>named_theorems\<close>
   573   Outer_Syntax.local_theory \<^command_keyword>\<open>named_theorems\<close>
   574     "declare named collection of theorems"
   574     "declare named collection of theorems"
   575     (Parse.and_list1 (Parse.binding -- Scan.optional Parse.text "") >>
   575     (Parse.and_list1 (Parse.binding -- Scan.optional Parse.embedded "") >>
   576       fold (fn (b, descr) => snd o Named_Theorems.declare b descr));
   576       fold (fn (b, descr) => snd o Named_Theorems.declare b descr));
   577 
   577 
   578 in end\<close>
   578 in end\<close>
   579 
   579 
   580 
   580