src/Pure/Isar/local_theory.ML
changeset 28406 daeb21fec18f
parent 28395 984fcc8feb24
child 28965 1de908189869
equal deleted inserted replaced
28405:000dee6d5d80 28406:daeb21fec18f
   152 
   152 
   153 fun theory f = #2 o theory_result (f #> pair ());
   153 fun theory f = #2 o theory_result (f #> pair ());
   154 
   154 
   155 fun target_result f lthy =
   155 fun target_result f lthy =
   156   let
   156   let
   157     val (res, ctxt') = f (target_of lthy);
   157     val (res, ctxt') = target_of lthy
       
   158       |> ContextPosition.set_visible false
       
   159       |> f
       
   160       ||> ContextPosition.restore_visible lthy;
   158     val thy' = ProofContext.theory_of ctxt';
   161     val thy' = ProofContext.theory_of ctxt';
   159     val lthy' = lthy
   162     val lthy' = lthy
   160       |> map_target (K ctxt')
   163       |> map_target (K ctxt')
   161       |> ProofContext.transfer thy';
   164       |> ProofContext.transfer thy';
   162   in (res, lthy') end;
   165   in (res, lthy') end;