src/Pure/context.ML
changeset 21660 c86b761d6c06
parent 21518 571b8cd087f8
child 21962 279b129498b6
     1.1 --- a/src/Pure/context.ML	Tue Dec 05 22:14:44 2006 +0100
     1.2 +++ b/src/Pure/context.ML	Tue Dec 05 22:14:45 2006 +0100
     1.3 @@ -73,6 +73,7 @@
     1.4    datatype generic = Theory of theory | Proof of proof
     1.5    val cases: (theory -> 'a) -> (proof -> 'a) -> generic -> 'a
     1.6    val mapping: (theory -> theory) -> (proof -> proof) -> generic -> generic
     1.7 +  val mapping_result: (theory -> 'a * theory) -> (proof -> 'a * proof) -> generic -> 'a * generic
     1.8    val the_theory: generic -> theory
     1.9    val the_proof: generic -> proof
    1.10    val map_theory: (theory -> theory) -> generic -> generic
    1.11 @@ -582,6 +583,7 @@
    1.12    | cases _ g (Proof prf) = g prf;
    1.13  
    1.14  fun mapping f g = cases (Theory o f) (Proof o g);
    1.15 +fun mapping_result f g = cases (apsnd Theory o f) (apsnd Proof o g);
    1.16  
    1.17  val the_theory = cases I (fn _ => raise Fail "Ill-typed context: theory expected");
    1.18  val the_proof = cases (fn _ => raise Fail "Ill-typed context: proof expected") I;