| Copyright | (c) 2016-2017 Daniel Lovasko |
|---|---|
| License | BSD2 |
| Maintainer | Daniel Lovasko <daniel.lovasko@gmail.com> |
| Stability | stable |
| Portability | portable |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Text.Tabl
Description
Text.Tabl arranges multiple Text instances into a table layout while providing means of alignment, and visual decoration both horizontally and vertically.
- data Alignment
- data Decoration
- = DecorNone
- | DecorAll
- | DecorInner
- | DecorOuter
- | DecorOnly [Int]
- | DecorExcept [Int]
- | DecorUnion [Decoration]
- | DecorIsect [Decoration]
- data Environment
- tabl :: Environment -> Decoration -> Decoration -> [Alignment] -> [[Text]] -> Text
Documentation
Presentation style that is used to define the alignment of each column of the table.
Constructors
| AlignLeft | left alignment |
| AlignCentre | centre |
| AlignRight | right alignment |
data Decoration Source #
Decoration style that defines which lines (horizontal or vertical) will be visible in the resulting table.
Constructors
| DecorNone | no lines |
| DecorAll | all lines |
| DecorInner | inner lines |
| DecorOuter | outer lines |
| DecorOnly [Int] | only certain lines |
| DecorExcept [Int] | all but certain lines |
| DecorUnion [Decoration] | union of more decorations |
| DecorIsect [Decoration] | intersection of more decorations |
Instances
data Environment Source #
Output environment that declares the way that the table will be rendered.
Instances
Arguments
| :: Environment | output environment |
| -> Decoration | horizontal decoration |
| -> Decoration | vertical decoration |
| -> [Alignment] | column alignments |
| -> [[Text]] | table cell data |
| -> Text | final layout |
Create a table layout based on the specified output environment, decorations and alignments.