signature PRINT structure Print : PRINT
This structure provides generic printers for values and types. It is solely intended as a debugging aid.
import structure Print from "x-alice:/lib/system/Print" import signature PRINT from "x-alice:/lib/system/PRINT-sig"
In the interactive toplevel the functions printVal and printType are available unqualified.
signature PRINT = sig val printWidth : int ref val printVal : 'a -> unit val printType : 'a -> unit val outputVal : TextIO.outstream * 'a * int -> unit val outputType : TextIO.outstream * 'a * int -> unit end
Controls the width of the output as performed by printVal and printType, i.e. the maximum number of characters on each line.
Pretty prints the value x to the stream strm in ML syntax. If the output exceeds w characters, output is broken into multiple lines appropriately.
The second form is equivalent to:
outputVal (TextIO.stdOut, x, !printWidth)
Pretty prints the type of value x to the stream strm in ML syntax. If the output exceeds w characters, output is broken into multiple lines appropriately.
The second form is equivalent to:
outputType (TextIO.stdOut, x, !printWidth)