Overview  Index  Help 
SMLFormat

SMLFORMAT

All Known Implementing Modules:

SMLFormat


signature SMLFORMAT =
sig
  structure FormatExpression : FORMAT_EXPRESSION
  structure PrinterParameter : PRINTER_PARAMETER
  structure BasicFormatters : BASIC_FORMATTERS
  datatype parameter = datatype PrinterParameter.parameter
  sharing type FormatExpression.expression = BasicFormatters.expression
  exception Fail of string
  val prettyPrint : parameter list -> FormatExpression.expression list -> string
end

Pretty-printer library for Standard ML.

Author:
YAMATODANI Kiyoshi
Version:
$Id: SigSMLFORMAT.html,v 1.3 2007/03/27 15:03:01 kiyoshiy Exp $

   
Datatype detail

parameter

datatype parameter = datatype PrinterParameter.parameter

   
Value detail

prettyPrint

fun prettyPrint parameter expressions
    : parameter list -> FormatExpression.expression list -> string

translates the format expressions into a text representation which fits within the specified column width.

This function tries to insert newline characters so that the text can fit within the specified column width, but it may exceed the specified column width if the column width is too small.

Parameters:
parameter
parameters which control the printer
expressions
a list of format expressions.
Returns:
the text representation of the expressions

 
Exception detail

Fail

exception Fail of string

raised when any error occurs.

Parameters:
message
the error message


Overview  Index  Help 
SMLFormat: Pretty-Printer library for SML