Maintainer | hapytexeu+gh@gmail.com |
---|---|
Stability | experimental |
Portability | POSIX |
Safe Haskell | Safe |
Language | Haskell2010 |
A frame is represented as a pair of horizontal and vertical lines. These can be any items, but currently only booleans and weight objects are covered to convert the item to a corresponding character.
Synopsis
- data Weight
- data Horizontal a = Horizontal {}
- data Vertical a = Vertical {}
- data Parts a = Parts (Vertical a) (Horizontal a)
- type Simple = Parts Bool
- type Weighted = Parts Weight
- pattern Frame :: a -> a -> a -> a -> Parts a
- simple :: Simple -> Char
- simple' :: Simple -> Char
- simpleWithArc :: Simple -> Char
- weighted :: Weighted -> Char
- simpleToWeighted :: Weight -> Simple -> Weighted
- simpleToLight :: Simple -> Weighted
- simpleToHeavy :: Simple -> Weighted
- weightedToSimple :: Weighted -> Simple
- fromWeighted :: Char -> Maybe Weighted
- fromWeighted' :: Char -> Weighted
- fromLight :: Char -> Maybe Simple
- fromLight' :: Char -> Simple
- fromHeavy :: Char -> Maybe Simple
- fromHeavy' :: Char -> Simple
- fromSimple :: Char -> Maybe Simple
- fromSimple' :: Char -> Simple
Line weight
Empty | The frame does not contain such line. |
Light | The frame contains such line. |
Heavy | The frame contains such line, in boldface. |
Instances
Bounded Weight Source # | |
Enum Weight Source # | |
Defined in Data.Char.Frame | |
Eq Weight Source # | |
Ord Weight Source # | |
Read Weight Source # | |
Show Weight Source # | |
Arbitrary Weight Source # | |
UnicodeText (Parts Weight) Source # | |
Defined in Data.Char.Frame | |
UnicodeCharacter (Parts Weight) Source # | |
Defined in Data.Char.Frame |
Datastructures to store the four directions
data Horizontal a Source #
Instances
Instances
A data type that specifies the four lines that should (not) be drawn for the frame.
Parts (Vertical a) (Horizontal a) |
Instances
Type aliasses and pattern synonyms for convenient Parts
:: a | The state of the line in the up direction. |
-> a | The state of the line in the down direction. |
-> a | The state of the line in the left direction. |
-> a | The state of the line in the right direction. |
-> Parts a | The |
A pattern that makes pattern matching and expressions with Parts
more convenient.
Functions to render specific frame values
:: Weighted | The |
-> Char | The character that represents these lines. |
Converts a given Weighted
to the char that can be used to render frames.