more operations;
authorwenzelm
Fri, 26 May 2023 11:46:51 +0200
changeset 78112 10487f6571bc
parent 78101 300537844bb7
child 78113 b14421dc6759
more operations;
src/Pure/morphism.ML
--- a/src/Pure/morphism.ML	Thu May 25 13:58:46 2023 +0200
+++ b/src/Pure/morphism.ML	Fri May 26 11:46:51 2023 +0200
@@ -49,6 +49,9 @@
   val transform_reset_context: morphism -> 'a entity -> 'a entity
   val form: 'a entity -> 'a
   val form_entity: (morphism -> 'a) -> 'a
+  val form_context: theory -> (theory -> 'a) entity -> 'a
+  val form_context': Proof.context -> (Proof.context -> 'a) entity -> 'a
+  val form_context'': Context.generic -> (Context.generic -> 'a) entity -> 'a
   type declaration = morphism -> Context.generic -> Context.generic
   type declaration_entity = (Context.generic -> Context.generic) entity
   val binding_morphism: string -> (binding -> binding) -> morphism
@@ -193,6 +196,10 @@
 fun form (Entity (f, phi)) = f phi;
 fun form_entity f = f identity;
 
+fun form_context thy x = form (entity_set_context thy x) thy;
+fun form_context' ctxt x = form (entity_set_context' ctxt x) ctxt;
+fun form_context'' context x = form (entity_set_context'' context x) context;
+
 type declaration = morphism -> Context.generic -> Context.generic;
 type declaration_entity = (Context.generic -> Context.generic) entity;