proper trim_context;
authorwenzelm
Tue, 06 Jun 2023 21:02:37 +0200
changeset 78140 90a43a9b3605
parent 78139 bb85bda12b8e
child 78141 456576153249
proper trim_context;
src/Pure/Isar/code.ML
--- a/src/Pure/Isar/code.ML	Tue Jun 06 15:29:43 2023 +0200
+++ b/src/Pure/Isar/code.ML	Tue Jun 06 21:02:37 2023 +0200
@@ -1307,9 +1307,11 @@
 
 (* abstract code declarations *)
 
-fun code_declaration strictness lift_phi f x =
-  Local_Theory.declaration {syntax = false, pervasive = false, pos = Position.thread_data ()}
-    (fn phi => Context.mapping (f strictness (lift_phi phi x)) I);
+fun code_declaration (strictness: strictness) transform f x =
+  let val x0 = transform Morphism.trim_context_morphism x in
+    Local_Theory.declaration {syntax = false, pervasive = false, pos = \<^here>}
+      (fn phi => Context.mapping (f strictness (transform phi x0)) I)
+  end;
 
 
 (* types *)