module MakeIO (
M
:
MONAD_IO
)
: sig
.. end
Example:
module PrintLwt = CCPrint.MakeIO(struct
include Lwt
type output = Lwt_io.output_channel
let write = Lwt_io.write
end);;
PrintLwt.printl Lwt_io.stdout (CCList.pp CCInt.pp) [1;2;3;4];;
- : unit Lwt.t
val output : M.output -> 'a CCPrint.t -> 'a -> unit M.t
Output a single value
val printl : M.output -> 'a CCPrint.t -> 'a -> unit M.t
Output a value and add a newline "\n" after.
val fprintf : M.output -> ('a, Buffer.t, unit, unit M.t) Pervasives.format4 -> 'a
Fprintf on a monadic output