# HG changeset patch # User wenzelm # Date 1703412834 -3600 # Node ID 13eb65caaffb54e55aea80cf2d5e2024c5e4ef64 # Parent e8d7b7d5390d8f7a78b1a2bea61e709fad0700ce tuned; diff -r e8d7b7d5390d -r 13eb65caaffb src/Pure/Isar/proof_context.ML --- a/src/Pure/Isar/proof_context.ML Sun Dec 24 11:13:33 2023 +0100 +++ b/src/Pure/Isar/proof_context.ML Sun Dec 24 11:13:54 2023 +0100 @@ -1054,10 +1054,10 @@ val (name, pos) = bind_name ctxt b; val facts' = facts |> Global_Theory.burrow_fact (Global_Theory.name_thms Global_Theory.unofficial1 (name, pos)); - fun app (ths, atts) = + fun app_fact (ths, atts) = fold_map (Thm.proof_attributes (surround (Thm.kind kind) (atts @ more_atts))) ths; - val (res, ctxt') = fold_map app facts' ctxt; - val thms = Global_Theory.name_thms Global_Theory.unofficial2 (name, pos) (flat res); + val (res, ctxt') = fold_maps app_fact facts' ctxt; + val thms = Global_Theory.name_thms Global_Theory.unofficial2 (name, pos) res; val (_, ctxt'') = ctxt' |> add_facts {index = is_stmt ctxt} (b, Lazy.value thms); in ((name, thms), ctxt'') end; diff -r e8d7b7d5390d -r 13eb65caaffb src/Pure/global_theory.ML --- a/src/Pure/global_theory.ML Sun Dec 24 11:13:33 2023 +0100 +++ b/src/Pure/global_theory.ML Sun Dec 24 11:13:54 2023 +0100 @@ -307,7 +307,7 @@ local val app_facts = - apfst flat oo fold_map (fn (thms, atts) => fn thy => + fold_maps (fn (thms, atts) => fn thy => fold_map (Thm.theory_attributes atts) (map (Thm.transfer thy) thms) thy); in