Overview  Index  Help 
SMLFormat

PRINTER_PARAMETER


signature PRINTER_PARAMETER =
sig
  datatype parameter =
           Newline of string
         | Space of string
         | Columns of int
         | GuardLeft of string
         | GuardRight of string
         | MaxDepthOfGuards of int option
         | MaxWidthOfGuards of int option
         | CutOverTail of bool
  val defaultNewline : string
  val defaultSpace : string
  val defaultColumns : int
  val defaultGuardLeft : string
  val defaultGuardRight : string
  val defaultMaxDepthOfGuards : int option
  val defaultMaxWidthOfGuards : int option
  val defaultCutOverTail : bool
end

parameter for pretty-printer.

Author:
YAMATODANI Kiyoshi
Version:
$Id: SigPRINTER_PARAMETER.html,v 1.4 2010/07/09 03:10:15 kiyoshiy Exp $

   
Datatype detail

parameter

datatype parameter =
         Newline of string
       | Space of string
       | Columns of int
       | GuardLeft of string
       | GuardRight of string
       | MaxDepthOfGuards of int option
       | MaxWidthOfGuards of int option
       | CutOverTail of bool

 
DataConstructor detail

Newline

constructor Newline : string -> parameter

a string used to begin a new line. For example, "\n" or "<br>".


Space

constructor Space : string -> parameter

a string used to insert a space. For example, " " or "&nbsp;". The specified string is considered to occupy 1 column in the formatted output.


Columns

constructor Columns : int -> parameter

the desired number of columns in which the output is formatted.


GuardLeft

constructor GuardLeft : string -> parameter

a string to be used to enclose at the left side of Guard. For example, "(" or "[". The specified string is considered to occupy 1 column in the formatted output.


GuardRight

constructor GuardRight : string -> parameter

a string to be used to enclose at the right side of Guard. For example, ")" or "]". The specified string is considered to occupy 1 column in the formatted output.


MaxDepthOfGuards

constructor MaxDepthOfGuards : int option -> parameter

specifies the maximum depth of nests of Guards to be formatted. Guards nested at deeper than specified are discarded. If NONE, Guards at every depth are formatted.


MaxWidthOfGuards

constructor MaxWidthOfGuards : int option -> parameter

specifies the maximum elements of Guards to be formatted. Only first elements of specified number are formatted. If NONE, all of elements of Guards are formatted.


CutOverTail

constructor CutOverTail : bool -> parameter

specifies whether to truncate tail-characters of each line if they over the specified number of columns.

 
Value detail

defaultNewline

val defaultNewline : string

Its value is "\n".


defaultSpace

val defaultSpace : string

Its value is " ".


defaultColumns

val defaultColumns : int

Its value is 80.


defaultGuardLeft

val defaultGuardLeft : string

Its value is "(".


defaultGuardRight

val defaultGuardRight : string

Its value is ")".


defaultMaxDepthOfGuards

val defaultMaxDepthOfGuards : int option

Its value is NONE.


defaultMaxWidthOfGuards

val defaultMaxWidthOfGuards : int option

Its value is NONE.


defaultCutOverTail

val defaultCutOverTail : bool

Its value is false.

 


Overview  Index  Help 
SMLFormat: Pretty-Printer library for SML