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
Line weight
Empty | The frame does not contain such line. |
Light | The frame contains such line. |
Heavy | The frame contains such line, in boldface. |
Datastructures to store the four directions
data Horizontal a Source #
Instances
Instances
Functor Vertical Source # | |
Applicative Vertical Source # | |
Foldable Vertical Source # | |
Defined in Data.Char.Frame fold :: Monoid m => Vertical m -> m # foldMap :: Monoid m => (a -> m) -> Vertical a -> m # foldr :: (a -> b -> b) -> b -> Vertical a -> b # foldr' :: (a -> b -> b) -> b -> Vertical a -> b # foldl :: (b -> a -> b) -> b -> Vertical a -> b # foldl' :: (b -> a -> b) -> b -> Vertical a -> b # foldr1 :: (a -> a -> a) -> Vertical a -> a # foldl1 :: (a -> a -> a) -> Vertical a -> a # elem :: Eq a => a -> Vertical a -> Bool # maximum :: Ord a => Vertical a -> a # minimum :: Ord a => Vertical a -> a # | |
Traversable Vertical Source # | |
Eq a => Eq (Vertical a) Source # | |
Ord a => Ord (Vertical a) Source # | |
Read a => Read (Vertical a) Source # | |
Show a => Show (Vertical a) Source # | |
Semigroup a => Semigroup (Vertical a) Source # | |
Monoid a => Monoid (Vertical a) Source # | |
Arbitrary a => Arbitrary (Vertical a) Source # | |
A data type that specifies the four lines that should (not) be drawn for the frame.
Parts (Vertical a) (Horizontal a) |
Instances
Functor Parts Source # | |
Applicative Parts Source # | |
Foldable Parts Source # | |
Defined in Data.Char.Frame fold :: Monoid m => Parts m -> m # foldMap :: Monoid m => (a -> m) -> Parts a -> m # foldr :: (a -> b -> b) -> b -> Parts a -> b # foldr' :: (a -> b -> b) -> b -> Parts a -> b # foldl :: (b -> a -> b) -> b -> Parts a -> b # foldl' :: (b -> a -> b) -> b -> Parts a -> b # foldr1 :: (a -> a -> a) -> Parts a -> a # foldl1 :: (a -> a -> a) -> Parts a -> a # elem :: Eq a => a -> Parts a -> Bool # maximum :: Ord a => Parts a -> a # minimum :: Ord a => Parts a -> a # | |
Traversable Parts Source # | |
Eq a => Eq (Parts a) Source # | |
Ord a => Ord (Parts a) Source # | |
Read a => Read (Parts a) Source # | |
Show a => Show (Parts a) Source # | |
Semigroup a => Semigroup (Parts a) Source # | |
Monoid a => Monoid (Parts a) Source # | |
Arbitrary a => Arbitrary (Parts a) Source # | |
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.