aboutsummaryrefslogtreecommitdiff
path: root/lib/pp.mli
blob: 62f402a9b2f43eb1a1b2833c50c63f81a54b56c1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
(* $Id$ *)

(*i*)
open Pp_control
(*i*)

type 'a ppcmd_token

type std_ppcmds = (int*string) ppcmd_token Stream.t

(* formatting commands *)
val sTR  : string -> (int*string) ppcmd_token (* string *)
val sTRas : int * string -> (int*string) ppcmd_token
                                              (* string with length *)
val bRK  : int * int -> 'a ppcmd_token        (* break *)
val tBRK : int * int -> 'a ppcmd_token        (* go to tabulation *)
val tAB  : 'a ppcmd_token                     (* set tabulation *)
val fNL  : 'a ppcmd_token                     (* force newline *)
val pifB : 'a ppcmd_token                     (* print if broken *)
val wS   : int -> 'a ppcmd_token              (* white space *)

(* derived commands *)
val sPC     : 'a ppcmd_token                        (* space *)
val cUT     : 'a ppcmd_token                        (* cut *)
val aLIGN   : 'a ppcmd_token                        (* go to tab *)
val iNT     : int -> (int*string) ppcmd_token       (* int *)
val rEAL    : float -> (int * string) ppcmd_token   (* real *)
val bOOL    : bool -> (int * string) ppcmd_token    (* bool *)
val qSTRING : string -> (int * string) ppcmd_token  (* quoted string *)
val qS      : string -> (int * string) ppcmd_token  (*   "       "   *)

(* boxing commands *)
val h   : int -> std_ppcmds -> std_ppcmds (* H box   *) 
val v   : int -> std_ppcmds -> std_ppcmds (* V box   *)
val hV  : int -> std_ppcmds -> std_ppcmds (* HV box  *)  
val hOV : int -> std_ppcmds -> std_ppcmds (* HOV box *)
val t   : std_ppcmds -> std_ppcmds        (* TAB box *)

(* Opening and closing of boxes *)
val hB    : int -> 'a ppcmd_token  (* open hbox *)
val vB    : int -> 'a ppcmd_token  (* open vbox *)
val hVB   : int -> 'a ppcmd_token  (* open hvbox *)
val hOVB  : int -> 'a ppcmd_token  (* open hovbox *)
val tB    : 'a ppcmd_token         (* open tbox *)
val cLOSE : 'a ppcmd_token         (* close box *)
val tCLOSE: 'a ppcmd_token         (* close tbox *)


(* pretty printing functions WITHOUT FLUSH *)
val pP_with       : Format.formatter -> std_ppcmds -> unit
val pPNL_with     : Format.formatter -> std_ppcmds -> unit
val warning_with  : Format.formatter -> string -> unit
val wARN_with     : Format.formatter -> std_ppcmds -> unit
val pp_flush_with : Format.formatter -> unit -> unit

(* pretty printing functions WITH FLUSH *)
val mSG_with      : Format.formatter -> std_ppcmds -> unit
val mSGNL_with    : Format.formatter -> std_ppcmds -> unit


(* These are instances of the previous ones on [std_ft] and [err_ft] *)

(* pretty printing functions WITHOUT FLUSH on stdout and stderr *)
val pP       : std_ppcmds -> unit
val pPNL     : std_ppcmds -> unit
val pPERR    : std_ppcmds -> unit
val pPERRNL  : std_ppcmds -> unit
val message  : string -> unit       (* = pPNL *)
val warning  : string -> unit
val wARN     : std_ppcmds -> unit
val pp_flush : unit -> unit
val flush_all: unit -> unit

(* pretty printing functions WITH FLUSH on stdout and stderr *)
val mSG      : std_ppcmds -> unit
val mSGNL    : std_ppcmds -> unit
val mSGERR   : std_ppcmds -> unit
val mSGERRNL : std_ppcmds -> unit
val wARNING  : std_ppcmds -> unit