backed out experimental b67bab2b132c, which slipped in accidentally
authorhaftmann
Wed, 17 Apr 2019 16:57:06 +0000
changeset 70366 ca9dfa7ee3bd
parent 70365 93516cb6cd30
child 70367 3ea80c950023
backed out experimental b67bab2b132c, which slipped in accidentally
src/HOL/Eisbach/method_closure.ML
src/Pure/Pure.thy
src/Pure/Tools/named_theorems.ML
src/Tools/atomize_elim.ML
--- a/src/HOL/Eisbach/method_closure.ML	Thu Apr 18 06:19:30 2019 +0200
+++ b/src/HOL/Eisbach/method_closure.ML	Wed Apr 17 16:57:06 2019 +0000
@@ -182,7 +182,7 @@
       |> Local_Theory.map_background_naming (Name_Space.add_path (Binding.name_of name))
       |> Config.put Method.old_section_parser true
       |> fold setup_local_method methods
-      |> fold_map (fn b => Named_Theorems.declare b [] "") uses;
+      |> fold_map (fn b => Named_Theorems.declare b "") uses;
 
     val (term_args, lthy2) = lthy1
       |> add_fixes vars |-> fold_map Proof_Context.inferred_param |>> map Free;
--- a/src/Pure/Pure.thy	Thu Apr 18 06:19:30 2019 +0200
+++ b/src/Pure/Pure.thy	Wed Apr 17 16:57:06 2019 +0000
@@ -545,9 +545,8 @@
 val _ =
   Outer_Syntax.local_theory \<^command_keyword>\<open>named_theorems\<close>
     "declare named collection of theorems"
-    (Parse.and_list1 (Parse.binding -- Scan.optional Parse.text ""
-      -- Scan.optional (\<^keyword>\<open>includes\<close> |-- Scan.repeat1 Parse.text) []) >>
-      fold (fn ((b, descr), extends) => snd o Named_Theorems.declare b extends descr));
+    (Parse.and_list1 (Parse.binding -- Scan.optional Parse.text "") >>
+      fold (fn (b, descr) => snd o Named_Theorems.declare b descr));
 
 in end\<close>
 
--- a/src/Pure/Tools/named_theorems.ML	Thu Apr 18 06:19:30 2019 +0200
+++ b/src/Pure/Tools/named_theorems.ML	Wed Apr 17 16:57:06 2019 +0000
@@ -14,8 +14,7 @@
   val add: string -> attribute
   val del: string -> attribute
   val check: Proof.context -> string * Position.T -> string
-  val declare: binding -> string list -> string ->
-    local_theory -> string * local_theory
+  val declare: binding -> string -> local_theory -> string * local_theory
 end;
 
 structure Named_Theorems: NAMED_THEOREMS =
@@ -88,17 +87,15 @@
 
 (* declaration *)
 
-fun declare binding raw_extends descr lthy =
+fun declare binding descr lthy =
   let
     val name = Local_Theory.full_name lthy binding;
-    val extends = map (fn s => check lthy (s, Position.none)) raw_extends;
     val description =
       "declaration of " ^ (if descr = "" then Binding.name_of binding ^ " rules" else descr);
     val lthy' = lthy
       |> Local_Theory.background_theory (Context.theory_map (new_entry name))
       |> Local_Theory.map_contexts (K (Context.proof_map (new_entry name)))
-      |> Local_Theory.add_thms_dynamic (binding,
-           fn context => maps (content context) (extends @ [name]))
+      |> Local_Theory.add_thms_dynamic (binding, fn context => content context name)
       |> Attrib.local_setup binding (Attrib.add_del (add name) (del name)) description
   in (name, lthy') end;
 
--- a/src/Tools/atomize_elim.ML	Thu Apr 18 06:19:30 2019 +0200
+++ b/src/Tools/atomize_elim.ML	Wed Apr 17 16:57:06 2019 +0000
@@ -19,7 +19,7 @@
 val named_theorems =
   Context.>>> (Context.map_theory_result
    (Named_Target.theory_init #>
-    Named_Theorems.declare \<^binding>\<open>atomize_elim\<close> [] "atomize_elim rewrite rule" ##>
+    Named_Theorems.declare \<^binding>\<open>atomize_elim\<close> "atomize_elim rewrite rule" ##>
     Local_Theory.exit_global));