equal
deleted
inserted
replaced
1043 (* common goal statements *) |
1043 (* common goal statements *) |
1044 |
1044 |
1045 local |
1045 local |
1046 |
1046 |
1047 fun gen_have prep_att prepp before_qed after_qed stmt int = |
1047 fun gen_have prep_att prepp before_qed after_qed stmt int = |
1048 local_goal (Proof_Display.print_results int) |
1048 local_goal (Proof_Display.print_results int (Position.thread_data ())) |
1049 prep_att prepp "have" before_qed after_qed stmt; |
1049 prep_att prepp "have" before_qed after_qed stmt; |
1050 |
1050 |
1051 fun gen_show prep_att prepp before_qed after_qed stmt int state = |
1051 fun gen_show prep_att prepp before_qed after_qed stmt int state = |
1052 let |
1052 let |
1053 val testing = Unsynchronized.ref false; |
1053 val testing = Unsynchronized.ref false; |
1055 fun fail_msg ctxt = |
1055 fun fail_msg ctxt = |
1056 "Local statement fails to refine any pending goal" :: |
1056 "Local statement fails to refine any pending goal" :: |
1057 (case ! rule of NONE => [] | SOME th => [Proof_Display.string_of_rule ctxt "Failed" th]) |
1057 (case ! rule of NONE => [] | SOME th => [Proof_Display.string_of_rule ctxt "Failed" th]) |
1058 |> cat_lines; |
1058 |> cat_lines; |
1059 |
1059 |
|
1060 val pos = Position.thread_data (); |
1060 fun print_results ctxt res = |
1061 fun print_results ctxt res = |
1061 if ! testing then () |
1062 if ! testing then () |
1062 else Proof_Display.print_results int ctxt res; |
1063 else Proof_Display.print_results int pos ctxt res; |
1063 fun print_rule ctxt th = |
1064 fun print_rule ctxt th = |
1064 if ! testing then rule := SOME th |
1065 if ! testing then rule := SOME th |
1065 else if int then |
1066 else if int then |
1066 writeln (Markup.markup Markup.state (Proof_Display.string_of_rule ctxt "Successful" th)) |
1067 writeln (Markup.markup Markup.state (Proof_Display.string_of_rule ctxt "Successful" th)) |
1067 else (); |
1068 else (); |