Self-documenting module.
Modulehslua-module-doclayout-1.1.1Haskell2010
HsLua.Module.DocLayout
Provides a Lua module which wraps . The Text.DocLayoutDoc'
type is specialized to Text@.
This module defines orphan instances for Doc Text.
- 41 values
- Packagehslua-module-doclayout-1.1.1
- Exports41
- LanguageHaskell2010
- LicenceMIT
- SourceDocLayout.hs
Module
6 declarationsPushes a documented module to the Lua stack.
Preload self-documenting module using the module's default name.
Textual description of the "doclayout" module.
Exposed fields.
Exposed module functions.
Doc constructors and combinators
26 declarationsCreates a Doc which is conditionally included only if it
comes at the beginning of a line.
Conditionally includes the given Doc unless it is
followed by a blank space.
Wrapped and documented blankline value.
Insert blank lines unless they exist already.
Puts a Doc in curly braces.
Puts a Doc in square brackets.
Like lblock but aligned centered.
Chomps trailing blank space off of a Doc.
Concatenates a list of Docs.
Wrapped and documented cr value.
Wraps a Doc in double quotes
Wrapped and documented empty value.
Makes a Doc flush against the left margin.
Creates a hanging indent.
Creates a block with the given width and content, aligned to the left.
Creates a Doc from a string.
Indents a Doc by the specified number of spaces.
Removes leading blank lines from a Doc.
Makes a Doc non-reflowable.
Puts a Doc in parentheses.
Uses the specified string as a prefix for every line of the inside document (except the first, if not at the beginning of the line).
Wraps a Doc in single quotes.
Like rblock but aligned to the right.
Wrapped and documented space value.
An expandable border that, when placed next to a box, expands to the height of the box. Strings cycle through the list provided.
Rendering
1 declarationRender a Doc. The text is reflowed on breakable spaces
to match the given line length. Text is not reflowed if the
line length parameter is omitted or nil.
Document Querying
6 declarationsTrue iff the document is empty.
Returns the height of a block or other Doc.
Returns the minimal width of a Doc when reflowed at
breakable spaces.
Returns the width of a Doc.
Returns the real length of a string in a monospace font: 0 for a combining character, 1, for a regular character, 2 for an East Asian wide character.
Returns the column that would be occupied by the last laid out character.
Marshaling
2 declarationsRetrieve a Doc Text value from the Lua stack. Strings are
converted to plain Doc values.
Push a Doc Text value to the Lua stack.