more standard merge order, following logical structure of imports rather than physical serials;
authorwenzelm
Sun, 14 May 2023 20:54:08 +0200
changeset 78044 2c3f4d80abfb
parent 78043 6c6eae08ff87
child 78045 bf4d535bbfcc
more standard merge order, following logical structure of imports rather than physical serials;
src/Pure/Isar/generic_target.ML
--- a/src/Pure/Isar/generic_target.ML	Sun May 14 13:15:52 2023 +0200
+++ b/src/Pure/Isar/generic_target.ML	Sun May 14 20:54:08 2023 +0200
@@ -167,18 +167,18 @@
 
 structure Foundation_Interpretations = Theory_Data
 (
-  type T = (binding * (term * term list) -> Context.generic -> Context.generic) Inttab.table;
-  val empty = Inttab.empty;
-  val merge = Inttab.merge (K true);
+  type T = ((binding * (term * term list) -> Context.generic -> Context.generic) * stamp) list
+  val empty = [];
+  val merge = Library.merge (eq_snd (op =));
 );
 
 fun add_foundation_interpretation f =
-  Foundation_Interpretations.map (Inttab.update_new (serial (), f));
+  Foundation_Interpretations.map (cons (f, stamp ()));
 
 fun foundation_interpretation binding_const_params lthy =
   let
     val interps = Foundation_Interpretations.get (Proof_Context.theory_of lthy);
-    val interp = Inttab.fold (fn (_, f) => f binding_const_params) interps;
+    val interp = fold (fn (f, _) => f binding_const_params) interps;
   in
     lthy
     |> Local_Theory.background_theory (Context.theory_map interp)