equal
deleted
inserted
replaced
26 |> Document.update_perspective old_id new_id name ids |
26 |> Document.update_perspective old_id new_id name ids |
27 |> Document.execute new_id |
27 |> Document.execute new_id |
28 end)); |
28 end)); |
29 |
29 |
30 val _ = |
30 val _ = |
31 Isabelle_Process.add_command "Isar_Document.edit_version" |
31 Isabelle_Process.add_command "Isar_Document.update" |
32 (fn [old_id_string, new_id_string, edits_yxml] => Document.change_state (fn state => |
32 (fn [old_id_string, new_id_string, edits_yxml] => Document.change_state (fn state => |
33 let |
33 let |
34 val old_id = Document.parse_id old_id_string; |
34 val old_id = Document.parse_id old_id_string; |
35 val new_id = Document.parse_id new_id_string; |
35 val new_id = Document.parse_id new_id_string; |
36 val edits = |
36 val edits = |
46 fn ([a], []) => Document.Header (Exn.Exn (ERROR a)), |
46 fn ([a], []) => Document.Header (Exn.Exn (ERROR a)), |
47 fn (a, []) => Document.Perspective (map int_atom a)])) |
47 fn (a, []) => Document.Perspective (map int_atom a)])) |
48 end; |
48 end; |
49 |
49 |
50 val running = Document.cancel_execution state; |
50 val running = Document.cancel_execution state; |
51 val (assignment, state') = Document.edit old_id new_id edits state; |
51 val (assignment, state') = Document.update old_id new_id edits state; |
52 val _ = Future.join_tasks running; |
52 val _ = Future.join_tasks running; |
53 val _ = Document.join_commands state'; |
53 val _ = Document.join_commands state'; |
54 val _ = |
54 val _ = |
55 Output.status (Markup.markup (Markup.assign new_id) |
55 Output.status (Markup.markup (Markup.assign new_id) |
56 (assignment |> |
56 (assignment |> |