[Home] Module Microsoft.FSharp.Text.StructuredFormat.LayoutOps


A layout is a sequence of strings which have been joined together. The strings are classified as words, separators and left and right parenthesis. This classification determines where spaces are inserted. A joint is either unbreakable, breakable or broken. If a joint is broken the RHS layout occurs on the next line with optional indentation. A layout can be squashed to for given width which forces breaks as required.

Values

ValueDescription
val ( $$ ) : Layout -> Layout -> Layout
Join, unbreakable.
val ( ++ ) : Layout -> Layout -> Layout
Join, possible break with indent=0
val ( -- ) : Layout -> Layout -> Layout
Join, possible break with indent=1
val ( --- ) : Layout -> Layout -> Layout
Join, possible break with indent=2
val ( @@ ) : Layout -> Layout -> Layout
Join broken with ident=0
val ( @@- ) : Layout -> Layout -> Layout
Join broken with ident=1
val ( @@-- ) : Layout -> Layout -> Layout
Join broken with ident=2
val aboveL : Layout -> Layout -> Layout
Layout two vertically.
val aboveListL : Layout list -> Layout
Layout list vertically.
val braceL : Layout -> Layout
Wrap braces around layout.
val bracketL : Layout -> Layout
Wrap round brackets around Layout.
val commaListL : Layout list -> Layout
Join layouts into a comma separated list.
val emptyL : Layout
The empty layout
val isEmptyL : Layout -> bool
Is it the empty layout?
val leftL : string -> Layout
An string which is left parenthesis (no space on the right).
val listL : ('T -> Layout) -> 'T list -> Layout
Layout like an F# list.
val objL : obj -> Layout
An uninterpreted leaf, to be interpreted into a string by the layout engine. This allows leaf layouts for numbers, strings and other atoms to be customized according to culture.
val optionL : ('T -> Layout) -> 'T option -> Layout
Layout like an F# option.
val rightL : string -> Layout
An string which is right parenthesis (no space on it's left).
val semiListL : Layout list -> Layout
Join layouts into a semi-colon separated list.
val sepL : string -> Layout
An string which requires no spaces either side.
val sepListL : Layout -> Layout list -> Layout
Join layouts into a list separated using the given Layout.
val spaceListL : Layout list -> Layout
Join layouts into a space separated list.
val squareBracketL : Layout -> Layout
Wrap square brackets around layout.
val tagAttrL : string -> (string * string) list -> Layout -> Layout
See tagL
val tupleL : Layout list -> Layout
Form tuple of layouts.
val unfoldL :
  ('T -> Layout) ->
    ('State -> ('T * 'State) option) -> 'State -> int -> Layout list
For limitting layout of list-like sequences (lists,arrays,etc). unfold a list of items using (project and z) making layout list via itemL. If reach maxLength (before exhausting) then truncate.
val wordL : string -> Layout
An string leaf

See Also

Microsoft.FSharp.Text.StructuredFormat


Documentation for assembly FSharp.PowerPack, version 1.9.6.16, generated using F# Programming Language version 1.9.6.16