diff -r 225486d9c960 -r a5d1d1e2f109 src/Pure/PIDE/byte_message.ML --- a/src/Pure/PIDE/byte_message.ML Sun Apr 11 21:23:51 2021 +0200 +++ b/src/Pure/PIDE/byte_message.ML Sun Apr 11 21:32:09 2021 +0200 @@ -7,6 +7,7 @@ signature BYTE_MESSAGE = sig val write: BinIO.outstream -> string list -> unit + val write_yxml: BinIO.outstream -> XML.tree -> unit val flush: BinIO.outstream -> unit val write_line: BinIO.outstream -> string -> unit val read: BinIO.instream -> int -> string @@ -25,6 +26,8 @@ fun write stream = List.app (File.output stream); +fun write_yxml stream tree = YXML.traverse (fn s => fn () => File.output stream s) tree (); + fun flush stream = ignore (try BinIO.flushOut stream); fun write_line stream s = (write stream [s, "\n"]; flush stream);