src/Pure/context.ML
changeset 26486 b65a5272b360
parent 26463 9283b4185fdf
child 26623 81547c8d51f8
--- a/src/Pure/context.ML	Sat Mar 29 19:14:07 2008 +0100
+++ b/src/Pure/context.ML	Sat Mar 29 19:14:08 2008 +0100
@@ -57,6 +57,8 @@
   val the_proof: generic -> proof
   val map_theory: (theory -> theory) -> generic -> generic
   val map_proof: (proof -> proof) -> generic -> generic
+  val map_theory_result: (theory -> 'a * theory) -> generic -> 'a * generic
+  val map_proof_result: (proof -> 'a * proof) -> generic -> 'a * generic
   val theory_map: (generic -> generic) -> theory -> theory
   val proof_map: (generic -> generic) -> proof -> proof
   val theory_of: generic -> theory   (*total*)
@@ -496,6 +498,9 @@
 fun map_theory f = Theory o f o the_theory;
 fun map_proof f = Proof o f o the_proof;
 
+fun map_theory_result f = apsnd Theory o f o the_theory;
+fun map_proof_result f = apsnd Proof o f o the_proof;
+
 fun theory_map f = the_theory o f o Theory;
 fun proof_map f = the_proof o f o Proof;