annotate lib/print.mli @ 0:bfdcc3820b32

Basis
author Mike Spivey <mike@cs.ox.ac.uk>
date Thu, 05 Oct 2017 08:04:15 +0100
parents
children
rev   line source
mike@0 1 (* lib/print.mli *)
mike@0 2 (* Copyright (c) 2017 J. M. Spivey *)
mike@0 3
mike@0 4 type arg
mike@0 5
mike@0 6 (* Basic formats *)
mike@0 7 val fNum : int -> arg (* Decimal number *)
mike@0 8 val fFix : int * int -> arg (* Fixed-width number (val, width) *)
mike@0 9 val fFlo : float -> arg (* Floating-point number *)
mike@0 10 val fStr : string -> arg (* String *)
mike@0 11 val fChr : char -> arg (* Character *)
mike@0 12 val fBool : bool -> arg (* Boolean *)
mike@0 13
mike@0 14 (* |fMeta| -- insert output of recursive call to |printf| *)
mike@0 15 val fMeta : string -> arg list -> arg
mike@0 16
mike@0 17 (* |fExt| -- higher-order extension *)
mike@0 18 val fExt : ((string -> arg list -> unit) -> unit) -> arg
mike@0 19
mike@0 20 (* |fList| -- format a comma-separated list *)
mike@0 21 val fList : ('a -> arg) -> 'a list -> arg
mike@0 22
mike@0 23 (* |printf| -- print on standard output *)
mike@0 24 val printf : string -> arg list -> unit
mike@0 25
mike@0 26 (* |fprintf| -- print to a file *)
mike@0 27 val fprintf : out_channel -> string -> arg list -> unit
mike@0 28
mike@0 29 (* |sprintf| -- print to a string *)
mike@0 30 val sprintf : string -> arg list -> string
mike@0 31
mike@0 32 (* |fgrindf| -- pretty-printer *)
mike@0 33 val fgrindf : out_channel -> string -> string -> arg list -> unit
mike@0 34
mike@0 35 val do_print : (char -> unit) -> string -> arg list -> unit