src/Pure/Isar/proof.ML
changeset 42042 264f8d0e899f
parent 41677 fa0da47131d2
child 42287 d98eb048a2e4
equal deleted inserted replaced
42041:f90040058a24 42042:264f8d0e899f
   997         writeln (Markup.markup Markup.state (Proof_Display.string_of_rule ctxt "Successful" th))
   997         writeln (Markup.markup Markup.state (Proof_Display.string_of_rule ctxt "Successful" th))
   998       else ();
   998       else ();
   999     val test_proof =
   999     val test_proof =
  1000       try (local_skip_proof true)
  1000       try (local_skip_proof true)
  1001       |> Unsynchronized.setmp testing true
  1001       |> Unsynchronized.setmp testing true
  1002       |> Exn.capture;
  1002       |> Exn.interruptible_capture;
  1003 
  1003 
  1004     fun after_qed' results =
  1004     fun after_qed' results =
  1005       refine_goals print_rule (context_of state) (flat results)
  1005       refine_goals print_rule (context_of state) (flat results)
  1006       #> check_result "Failed to refine any pending goal"
  1006       #> check_result "Failed to refine any pending goal"
  1007       #> after_qed results;
  1007       #> after_qed results;
  1010     |> local_goal print_results prep_att prepp "show" before_qed after_qed' stmt
  1010     |> local_goal print_results prep_att prepp "show" before_qed after_qed' stmt
  1011     |> int ? (fn goal_state =>
  1011     |> int ? (fn goal_state =>
  1012       (case test_proof goal_state of
  1012       (case test_proof goal_state of
  1013         Exn.Result (SOME _) => goal_state
  1013         Exn.Result (SOME _) => goal_state
  1014       | Exn.Result NONE => error (fail_msg (context_of goal_state))
  1014       | Exn.Result NONE => error (fail_msg (context_of goal_state))
  1015       | Exn.Exn exn =>
  1015       | Exn.Exn exn => raise Exn.EXCEPTIONS ([exn, ERROR (fail_msg (context_of goal_state))])))
  1016           if Exn.is_interrupt exn then reraise exn
       
  1017           else raise Exn.EXCEPTIONS ([exn, ERROR (fail_msg (context_of goal_state))])))
       
  1018   end;
  1016   end;
  1019 
  1017 
  1020 in
  1018 in
  1021 
  1019 
  1022 val have = gen_have (K I) ProofContext.bind_propp_i;
  1020 val have = gen_have (K I) ProofContext.bind_propp_i;