Module type Markup.ASYNCHRONOUS
Markup.ml interface for monadic I/O libraries such as Lwt and Async.
This signature is implemented by Markup_lwt, with a few additions.
Each function here corresponds directly to the function in the basic module Markup that has the same name. So, see Markup for details.
The only difference is that functions here, all of which are higher-order functions, take a function as argument that returns an 'a io promise, rather than returning an already-computed value.
Promises
Encodings
module Encoding : sig ... endAsynchronous counterpart to
Markup.Encoding.
XML
val parse_xml : ?report:(location -> Error.t -> unit io) -> ?encoding:Encoding.t -> ?namespace:(string -> string option) -> ?entity:(string -> string option) -> ?context:[< `Document | `Fragment ] -> (char, _) stream -> async parserval write_xml : ?report:((signal * int) -> Error.t -> unit io) -> ?prefix:(string -> string option) -> ([< signal ], _) stream -> (char, async) stream
HTML
I/O
Stream manipulation
val stream : (unit -> 'a option io) -> ('a, async) streamval next : ('a, _) stream -> 'a option ioval peek : ('a, _) stream -> 'a option ioval transform : ('a -> 'b -> ('c list * 'a option) io) -> 'a -> ('b, _) stream -> ('c, async) streamval fold : ('a -> 'b -> 'a io) -> 'a -> ('b, _) stream -> 'a ioval map : ('a -> 'b io) -> ('a, _) stream -> ('b, async) streamval filter : ('a -> bool io) -> ('a, _) stream -> ('a, async) streamval filter_map : ('a -> 'b option io) -> ('a, _) stream -> ('b, async) streamval iter : ('a -> unit io) -> ('a, _) stream -> unit ioval drain : ('a, _) stream -> unit ioval to_list : ('a, _) stream -> 'a list ioval load : ('a, _) stream -> ('a, sync) stream ioload sconverts a general streamsto a synchronous stream by buffering it.