tuned;
authorwenzelm
Mon, 24 Sep 2018 20:05:41 +0200
changeset 69060 df6c946cb296
parent 69059 70f9826753f6
child 69061 da448868a18a
tuned;
src/Pure/Isar/locale.ML
--- a/src/Pure/Isar/locale.ML	Mon Sep 24 19:53:45 2018 +0200
+++ b/src/Pure/Isar/locale.ML	Mon Sep 24 20:05:41 2018 +0200
@@ -607,17 +607,17 @@
 fun add_dependency loc {inst = (name, morph), mixin, export} thy =
   let
     val serial' = serial ();
-    val thy' = thy |>
-      (change_locale loc o apsnd)
-        (apfst (cons ((name, (morph, export)), serial')) #>
-          apsnd (case mixin of NONE => I | SOME mixin => insert_mixin serial' mixin));
+    val add_dep =
+      apfst (cons ((name, (morph, export)), serial')) #>
+      apsnd (case mixin of NONE => I | SOME mixin => insert_mixin serial' mixin);
+    val thy' = change_locale loc (apsnd add_dep) thy;
     val context' = Context.Theory thy';
     val (_, regs) =
       fold_rev (roundup thy' cons export)
         (registrations_of context' loc) (Idents.get context', []);
   in
-    thy'
-    |> fold_rev (fn dep => add_registration_theory {inst = dep, mixin = NONE, export = export}) regs
+    fold_rev (fn inst => add_registration_theory {inst = inst, mixin = NONE, export = export})
+      regs thy'
   end;