| SMLFormat |
structure FormatExpression : FORMAT_EXPRESSION =
struct
type assoc = {cut : bool, strength : int, direction : assocDirection}
datatype priority = Preferred of int | Deferred
datatype assocDirection = Left | Right | Neutral
datatype expression =
Term of int * string
| Guard of assoc option * expression list
| Indicator of {space : bool, newline : {priority : priority} option}
| StartOfIndent of int
| EndOfIndent
val isHigherThan : priority * priority -> bool
val assocToString : assoc -> string
val priorityToString : priority -> string
val toString : expression -> string
val parse
: (char, 'a) StringCvt.reader -> (expression list, 'a) StringCvt.reader
end
Type detail |
---|
type assoc = {cut : bool, strength : int, direction : assocDirection}
Datatype detail |
---|
datatype priority = Preferred of int | Deferred
datatype assocDirection = Left | Right | Neutral
datatype expression =
Term of int * string
| Guard of assoc option * expression list
| Indicator of {space : bool, newline : {priority : priority} option}
| StartOfIndent of int
| EndOfIndent
DataConstructor detail |
---|
constructor Preferred : int -> priority
constructor Deferred : priority
constructor Left : assocDirection
constructor Right : assocDirection
constructor Neutral : assocDirection
constructor Term : int * string -> expression
constructor Guard : assoc option * expression list -> expression
constructor Indicator
: {space : bool, newline : {priority : priority} option} ->
expression
constructor StartOfIndent : int -> expression
constructor EndOfIndent : expression
Value detail |
---|
val isHigherThan : priority * priority -> bool
val assocToString : assoc -> string
val priorityToString : priority -> string
val toString : expression -> string
val parse
: (char, 'a) StringCvt.reader -> (expression list, 'a) StringCvt.reader
| SMLFormat: Pretty-Printer library for SML |