src/Pure/PIDE/isar_document.ML
changeset 43731 70072780e095
parent 43724 4e58485fa320
child 43748 c70bd78ec83c
equal deleted inserted replaced
43730:a0ed7bc688b5 43731:70072780e095
    16     (fn [old_id_string, new_id_string, edits_yxml, headers_yxml] => Document.change_state (fn state =>
    16     (fn [old_id_string, new_id_string, edits_yxml, headers_yxml] => Document.change_state (fn state =>
    17       let
    17       let
    18         val old_id = Document.parse_id old_id_string;
    18         val old_id = Document.parse_id old_id_string;
    19         val new_id = Document.parse_id new_id_string;
    19         val new_id = Document.parse_id new_id_string;
    20         val edits = YXML.parse_body edits_yxml |>
    20         val edits = YXML.parse_body edits_yxml |>
    21           let open XML_Data.Dest
    21           let open XML_Data.Decode
    22           in list (pair string (option (list (pair (option int) (option int))))) end;
    22           in list (pair string (option (list (pair (option int) (option int))))) end;
    23         val headers = YXML.parse_body headers_yxml |>
    23         val headers = YXML.parse_body headers_yxml |>
    24           let open XML_Data.Dest
    24           let open XML_Data.Decode
    25           in list (pair string (triple string (list string) (list string))) end;
    25           in list (pair string (triple string (list string) (list string))) end;
    26 
    26 
    27       val await_cancellation = Document.cancel_execution state;
    27       val await_cancellation = Document.cancel_execution state;
    28       val (updates, state') = Document.edit old_id new_id edits headers state;
    28       val (updates, state') = Document.edit old_id new_id edits headers state;
    29       val _ = await_cancellation ();
    29       val _ = await_cancellation ();