Self-documenting module.
Modulehslua-module-doclayout-1.2.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.
Synopsis
- value documentedModule
- value pushModule
- value preloadModule
- value description
- value fields
- value functions
- value after_break
- value before_non_blank
- value blankline
- value blanklines
- value braces
- value brackets
- value cblock
- value chomp
- value concat
- value cr
- value double_quotes
- value empty
- value flush
- value hang
- value inside
- value lblock
- value literal
- value nest
- value nestle
- value nowrap
- value parens
- value prefixed
- value quotes
- value rblock
- value space
- value vfill
- value render
- value is_empty
- value height
- value min_offset
- value offset
- value real_length
- value update_column
- value bold
- value italic
- value underlined
- value strikeout
- value fg
- value bg
- value peekDoc
- value pushDoc
- Packagehslua-module-doclayout-1.2.1.1
- Exports47
- LanguageHaskell2010
- LicenceMIT
- SourceDocLayout.hs
Module
Pushes 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
Creates 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
Render 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
True 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.
Styling
Marshaling
Retrieve a Doc Text value from the Lua stack. Strings are
converted to plain Doc values.
Push a Doc Text value to the Lua stack.