tuned;
authorwenzelm
Sun, 18 Feb 2018 20:08:21 +0100
changeset 67655 8f4810b9d9d1
parent 67654 49f45fcd335b
child 67656 59feb83c6ab9
child 67657 ef20d4961f86
child 67673 c8caefb20564
tuned;
src/Pure/Isar/locale.ML
--- a/src/Pure/Isar/locale.ML	Sun Feb 18 19:49:01 2018 +0100
+++ b/src/Pure/Isar/locale.ML	Sun Feb 18 20:08:21 2018 +0100
@@ -583,29 +583,24 @@
 
 (*** Storing results ***)
 
-(* Theorems *)
-
 fun add_facts loc kind facts ctxt =
   if null facts then ctxt
   else
     let
-      val stored_notes = ((kind, map Attrib.trim_context_fact facts), serial ());
+      val notes = ((kind, map Attrib.trim_context_fact facts), serial ());
 
       fun global_notes morph thy = thy
-        |> (snd o Attrib.global_notes kind
-            (Attrib.transform_facts (Morphism.transfer_morphism thy $> morph) facts));
-      fun registrations thy =
+        |> Attrib.global_notes kind
+            (Attrib.transform_facts (Morphism.transfer_morphism thy $> morph) facts) |> #2;
+      fun apply_registrations thy =
         fold_rev (global_notes o #2) (registrations_of (Context.Theory thy) loc) thy;
     in
       ctxt
-      |> Attrib.local_notes kind facts |> snd
+      |> Attrib.local_notes kind facts |> #2
       |> Proof_Context.background_theory
-        ((change_locale loc o apfst o apsnd) (cons stored_notes) #> registrations)
+        ((change_locale loc o apfst o apsnd) (cons notes) #> apply_registrations)
     end;
 
-
-(* Declarations *)
-
 fun add_declaration loc syntax decl =
   syntax ?
     Proof_Context.background_theory ((change_locale loc o apfst o apfst) (cons (decl, serial ())))