equal
deleted
inserted
replaced
172 fun commit_exit () = |
172 fun commit_exit () = |
173 let val (id, (st, _)) = point_result () in |
173 let val (id, (st, _)) = point_result () in |
174 (case (Toplevel.is_toplevel st, prev_command id) of |
174 (case (Toplevel.is_toplevel st, prev_command id) of |
175 (true, SOME prev) => |
175 (true, SOME prev) => |
176 (case Toplevel.transition true Toplevel.commit_exit (#1 (the_result prev)) of |
176 (case Toplevel.transition true Toplevel.commit_exit (#1 (the_result prev)) of |
177 SOME (_, SOME (exn, msg)) => raise Exn.EXCEPTIONS ([exn], msg) |
177 SOME (_, SOME err) => error (Toplevel.exn_message (Toplevel.EXCURSION_FAIL err)) |
178 | _ => ()) |
178 | _ => init_point ()) |
179 | _ => error "Expected to find finished theory") |
179 | _ => error "Expected to find finished theory") |
180 end; |
180 end; |
181 |
181 |
182 |
182 |
183 (* interactive state transformations --- NOT THREAD-SAFE! *) |
183 (* interactive state transformations --- NOT THREAD-SAFE! *) |