Fmlib.Readable_printerA readable printer is a structure you can issue print commands on and which returns a readable structure which can be read character by character.
A readable printer is a very lightweight and lazy structure. Issuing a command like string "hello" just stores the string and does nothing else.
Since the printer is organized as a monoid you chain to printers p1 and p2 by p1 <+> p2.
If you printed all your stuff to the printer p you use readable p to generate a readable structure. The readable structure is lazy as well. It just has the first item (string, substring, fill or character) explicitly and a function to generate the rest if needed. So the actual output is generated on demand.
module R : Module_types.READABLEThe readable structure returned by the printer.
val empty : tThe readable printer printing nothing.
val string : string -> tstring s prints the string s.
val substring : string -> int -> int -> tsubstring s start len prints the substring of s starting at position start with length len.
val fill : int -> char -> tfill n c prints the character c n times.
val char : char -> tchar c prints the character c.