hable-0.3.0: customizable pretty printer library for tables

Safe HaskellSafe
LanguageHaskell2010

Hable.BoxChar

Synopsis

Documentation

data BoxChar style Source #

Describes a styled box character. You can use any data type to represent a style as long as the charset of your Config supports it.

Be careful with all these getter functions like bcVStyle as they are not complete. (E.g. bcHStyle (Bar ()) will fail with an exception error.)

Constructors

Bar

Represents a box character in the shape of |.

Fields

Dash

Represents a box character in the shape of .

Fields

Angled

Represents any other box character.

Imagine a 2x2 table. The bcVPos and bcHPos use the Align data type to describe the position of the angled box character this Angled constructor represents.

E.g. Angled HLeft foo VBottom bar represents an L-like shaped box character as that's the shape of the character at the bottom-left edge of a 2x2 table.

Another example: Angled HCenter HCenter describes a box character shaped like a plus +.

Fields

data HAxis Source #

Describe a value (e.g. direction or position) on the horizontal axis.

Constructors

HLeft

Means either on the left (in context of BoxChar) or to the left (in context of hAlign).

HCenter

Means either inbetween left and right (in context of BoxChar) or (horizontally) centered (in context of hAlign).

HRight

Means either on the right (in context of BoxChar) or to the right (in context of hAlign).

data VAxis Source #

Describe a value (e.g. direction or position) on the vertical axis.

Constructors

VTop

Means at the top.

VCenter

Means either inbetween top and bottom (in context of BoxChar) or (vertically) centered (in context of vAlign).

VBottom

Means at the bottom.