The PRINTCONTROL signature

Interface to parameters that control top-level printing.


Synopsis

signature PRINTCONTROL
structure Compiler.Control.Print : PRINTCONTROL

Interface

val printDepth : int ref
val printLength : int ref
val stringDepth : int ref
val printLoop : bool ref
val signatures : int ref
val printOpens : bool ref
val out : {say : string -> unit, flush : unit -> unit} ref
val linewidth : int ref
val say : string -> unit
val flush : unit -> unit

Description

printDepth
The depth of nesting of recursive data structure at which ellipsis begins.

printLength
The length of lists at which ellipsis begins.

stringDepth
The length of strings at which ellipsis begins.

printLoop
Whether to treat loops (involving ref cells) specially when printing.

signatures
Whether to print signature bodies at their declarations.

printOpens
Whether to print signature bodies when they are opened.

out
The stream to which all compiler messages and top-level value printing should go. Initialized to TextIO.stdOut. To suppress all printout by the compiler, assign empty functions:
Compiler.Control.Print.out := {say=fn _=>(), flush=fn()=>()};
	 


linewidth
The number of characters per line for prettyprinting to out.

say s
Write s to out.

flush ()
Same as #flush(!out)()