unicode-tricks-0.14.1.0: Functions to work with unicode blocks more convenient.
Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Data.Char.Frame

Description

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

Line weight

data Weight Source #

The weights of the frame lines, these can be Empty, Light or Heavy.

Constructors

Empty

The frame does not contain such line.

Light

The frame contains such line.

Heavy

The frame contains such line, in boldface.

Instances

Instances details
Arbitrary Weight Source # 
Instance details

Defined in Data.Char.Frame

Data Weight Source # 
Instance details

Defined in Data.Char.Frame

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Weight -> c Weight #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Weight #

toConstr :: Weight -> Constr #

dataTypeOf :: Weight -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Weight) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Weight) #

gmapT :: (forall b. Data b => b -> b) -> Weight -> Weight #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Weight -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Weight -> r #

gmapQ :: (forall d. Data d => d -> u) -> Weight -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Weight -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Weight -> m Weight #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Weight -> m Weight #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Weight -> m Weight #

Bounded Weight Source # 
Instance details

Defined in Data.Char.Frame

Enum Weight Source # 
Instance details

Defined in Data.Char.Frame

Generic Weight Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep Weight :: Type -> Type #

Methods

from :: Weight -> Rep Weight x #

to :: Rep Weight x -> Weight #

Read Weight Source # 
Instance details

Defined in Data.Char.Frame

Show Weight Source # 
Instance details

Defined in Data.Char.Frame

NFData Weight Source # 
Instance details

Defined in Data.Char.Frame

Methods

rnf :: Weight -> () #

Eq Weight Source # 
Instance details

Defined in Data.Char.Frame

Methods

(==) :: Weight -> Weight -> Bool #

(/=) :: Weight -> Weight -> Bool #

Ord Weight Source # 
Instance details

Defined in Data.Char.Frame

Hashable Weight Source # 
Instance details

Defined in Data.Char.Frame

Methods

hashWithSalt :: Int -> Weight -> Int #

hash :: Weight -> Int #

UnicodeCharacter (Parts Weight) Source # 
Instance details

Defined in Data.Char.Frame

UnicodeText (Parts Weight) Source # 
Instance details

Defined in Data.Char.Frame

type Rep Weight Source # 
Instance details

Defined in Data.Char.Frame

type Rep Weight = D1 ('MetaData "Weight" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Empty" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Light" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Heavy" 'PrefixI 'False) (U1 :: Type -> Type)))

Datastructures to store the four directions

data Horizontal a Source #

A data type that determines the state of the horizontal lines of the frame (left and right).

Constructors

Horizontal 

Fields

  • left :: a

    The state of the left line of the frame.

  • right :: a

    The state of the right line of the frame.

Instances

Instances details
Arbitrary1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftArbitrary :: Gen a -> Gen (Horizontal a) #

liftShrink :: (a -> [a]) -> Horizontal a -> [Horizontal a] #

Foldable Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

fold :: Monoid m => Horizontal m -> m #

foldMap :: Monoid m => (a -> m) -> Horizontal a -> m #

foldMap' :: Monoid m => (a -> m) -> Horizontal a -> m #

foldr :: (a -> b -> b) -> b -> Horizontal a -> b #

foldr' :: (a -> b -> b) -> b -> Horizontal a -> b #

foldl :: (b -> a -> b) -> b -> Horizontal a -> b #

foldl' :: (b -> a -> b) -> b -> Horizontal a -> b #

foldr1 :: (a -> a -> a) -> Horizontal a -> a #

foldl1 :: (a -> a -> a) -> Horizontal a -> a #

toList :: Horizontal a -> [a] #

null :: Horizontal a -> Bool #

length :: Horizontal a -> Int #

elem :: Eq a => a -> Horizontal a -> Bool #

maximum :: Ord a => Horizontal a -> a #

minimum :: Ord a => Horizontal a -> a #

sum :: Num a => Horizontal a -> a #

product :: Num a => Horizontal a -> a #

Eq1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftEq :: (a -> b -> Bool) -> Horizontal a -> Horizontal b -> Bool #

Ord1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftCompare :: (a -> b -> Ordering) -> Horizontal a -> Horizontal b -> Ordering #

Traversable Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

traverse :: Applicative f => (a -> f b) -> Horizontal a -> f (Horizontal b) #

sequenceA :: Applicative f => Horizontal (f a) -> f (Horizontal a) #

mapM :: Monad m => (a -> m b) -> Horizontal a -> m (Horizontal b) #

sequence :: Monad m => Horizontal (m a) -> m (Horizontal a) #

Applicative Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

pure :: a -> Horizontal a #

(<*>) :: Horizontal (a -> b) -> Horizontal a -> Horizontal b #

liftA2 :: (a -> b -> c) -> Horizontal a -> Horizontal b -> Horizontal c #

(*>) :: Horizontal a -> Horizontal b -> Horizontal b #

(<*) :: Horizontal a -> Horizontal b -> Horizontal a #

Functor Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

fmap :: (a -> b) -> Horizontal a -> Horizontal b #

(<$) :: a -> Horizontal b -> Horizontal a #

NFData1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftRnf :: (a -> ()) -> Horizontal a -> () #

Hashable1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Horizontal a -> Int #

Generic1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep1 Horizontal :: k -> Type #

Methods

from1 :: forall (a :: k). Horizontal a -> Rep1 Horizontal a #

to1 :: forall (a :: k). Rep1 Horizontal a -> Horizontal a #

Arbitrary a => Arbitrary (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Data a => Data (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Horizontal a -> c (Horizontal a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Horizontal a) #

toConstr :: Horizontal a -> Constr #

dataTypeOf :: Horizontal a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Horizontal a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Horizontal a)) #

gmapT :: (forall b. Data b => b -> b) -> Horizontal a -> Horizontal a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Horizontal a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Horizontal a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Horizontal a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Horizontal a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Horizontal a -> m (Horizontal a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Horizontal a -> m (Horizontal a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Horizontal a -> m (Horizontal a) #

Monoid a => Monoid (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Semigroup a => Semigroup (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Bounded a => Bounded (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Generic (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep (Horizontal a) :: Type -> Type #

Methods

from :: Horizontal a -> Rep (Horizontal a) x #

to :: Rep (Horizontal a) x -> Horizontal a #

Read a => Read (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Show a => Show (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

NFData a => NFData (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

rnf :: Horizontal a -> () #

Eq a => Eq (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

(==) :: Horizontal a -> Horizontal a -> Bool #

(/=) :: Horizontal a -> Horizontal a -> Bool #

Ord a => Ord (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Hashable a => Hashable (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

hashWithSalt :: Int -> Horizontal a -> Int #

hash :: Horizontal a -> Int #

MirrorVertical (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Horizontal Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Horizontal = D1 ('MetaData "Horizontal" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Horizontal" 'PrefixI 'True) (S1 ('MetaSel ('Just "left") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel ('Just "right") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (Horizontal a) Source # 
Instance details

Defined in Data.Char.Frame

type Rep (Horizontal a) = D1 ('MetaData "Horizontal" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Horizontal" 'PrefixI 'True) (S1 ('MetaSel ('Just "left") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "right") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data Vertical a Source #

A data type that determines the state of the vertical lines of the frame (up and down).

Constructors

Vertical 

Fields

  • up :: a

    The state of the line in the up direction of the frame.

  • down :: a

    The state of the line in the down direction of the frame.

Instances

Instances details
Arbitrary1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftArbitrary :: Gen a -> Gen (Vertical a) #

liftShrink :: (a -> [a]) -> Vertical a -> [Vertical a] #

Foldable Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

fold :: Monoid m => Vertical m -> m #

foldMap :: Monoid m => (a -> m) -> Vertical a -> 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 #

toList :: Vertical a -> [a] #

null :: Vertical a -> Bool #

length :: Vertical a -> Int #

elem :: Eq a => a -> Vertical a -> Bool #

maximum :: Ord a => Vertical a -> a #

minimum :: Ord a => Vertical a -> a #

sum :: Num a => Vertical a -> a #

product :: Num a => Vertical a -> a #

Eq1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftEq :: (a -> b -> Bool) -> Vertical a -> Vertical b -> Bool #

Ord1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftCompare :: (a -> b -> Ordering) -> Vertical a -> Vertical b -> Ordering #

Traversable Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

traverse :: Applicative f => (a -> f b) -> Vertical a -> f (Vertical b) #

sequenceA :: Applicative f => Vertical (f a) -> f (Vertical a) #

mapM :: Monad m => (a -> m b) -> Vertical a -> m (Vertical b) #

sequence :: Monad m => Vertical (m a) -> m (Vertical a) #

Applicative Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

pure :: a -> Vertical a #

(<*>) :: Vertical (a -> b) -> Vertical a -> Vertical b #

liftA2 :: (a -> b -> c) -> Vertical a -> Vertical b -> Vertical c #

(*>) :: Vertical a -> Vertical b -> Vertical b #

(<*) :: Vertical a -> Vertical b -> Vertical a #

Functor Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

fmap :: (a -> b) -> Vertical a -> Vertical b #

(<$) :: a -> Vertical b -> Vertical a #

NFData1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftRnf :: (a -> ()) -> Vertical a -> () #

Hashable1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Vertical a -> Int #

Generic1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep1 Vertical :: k -> Type #

Methods

from1 :: forall (a :: k). Vertical a -> Rep1 Vertical a #

to1 :: forall (a :: k). Rep1 Vertical a -> Vertical a #

Arbitrary a => Arbitrary (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

arbitrary :: Gen (Vertical a) #

shrink :: Vertical a -> [Vertical a] #

Data a => Data (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Vertical a -> c (Vertical a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Vertical a) #

toConstr :: Vertical a -> Constr #

dataTypeOf :: Vertical a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Vertical a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Vertical a)) #

gmapT :: (forall b. Data b => b -> b) -> Vertical a -> Vertical a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Vertical a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Vertical a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Vertical a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Vertical a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Vertical a -> m (Vertical a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Vertical a -> m (Vertical a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Vertical a -> m (Vertical a) #

Monoid a => Monoid (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

mempty :: Vertical a #

mappend :: Vertical a -> Vertical a -> Vertical a #

mconcat :: [Vertical a] -> Vertical a #

Semigroup a => Semigroup (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

(<>) :: Vertical a -> Vertical a -> Vertical a #

sconcat :: NonEmpty (Vertical a) -> Vertical a #

stimes :: Integral b => b -> Vertical a -> Vertical a #

Bounded a => Bounded (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Generic (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep (Vertical a) :: Type -> Type #

Methods

from :: Vertical a -> Rep (Vertical a) x #

to :: Rep (Vertical a) x -> Vertical a #

Read a => Read (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Show a => Show (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

showsPrec :: Int -> Vertical a -> ShowS #

show :: Vertical a -> String #

showList :: [Vertical a] -> ShowS #

NFData a => NFData (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

rnf :: Vertical a -> () #

Eq a => Eq (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

(==) :: Vertical a -> Vertical a -> Bool #

(/=) :: Vertical a -> Vertical a -> Bool #

Ord a => Ord (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

compare :: Vertical a -> Vertical a -> Ordering #

(<) :: Vertical a -> Vertical a -> Bool #

(<=) :: Vertical a -> Vertical a -> Bool #

(>) :: Vertical a -> Vertical a -> Bool #

(>=) :: Vertical a -> Vertical a -> Bool #

max :: Vertical a -> Vertical a -> Vertical a #

min :: Vertical a -> Vertical a -> Vertical a #

Hashable a => Hashable (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

hashWithSalt :: Int -> Vertical a -> Int #

hash :: Vertical a -> Int #

MirrorHorizontal (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Vertical Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Vertical = D1 ('MetaData "Vertical" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Vertical" 'PrefixI 'True) (S1 ('MetaSel ('Just "up") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1 :*: S1 ('MetaSel ('Just "down") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1))
type Rep (Vertical a) Source # 
Instance details

Defined in Data.Char.Frame

type Rep (Vertical a) = D1 ('MetaData "Vertical" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Vertical" 'PrefixI 'True) (S1 ('MetaSel ('Just "up") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "down") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

data Parts a Source #

A data type that specifies the four lines that should (not) be drawn for the frame.

Constructors

Parts (Vertical a) (Horizontal a) 

Instances

Instances details
Arbitrary1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftArbitrary :: Gen a -> Gen (Parts a) #

liftShrink :: (a -> [a]) -> Parts a -> [Parts a] #

Foldable Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

fold :: Monoid m => Parts m -> m #

foldMap :: Monoid m => (a -> m) -> Parts a -> 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 #

toList :: Parts a -> [a] #

null :: Parts a -> Bool #

length :: Parts a -> Int #

elem :: Eq a => a -> Parts a -> Bool #

maximum :: Ord a => Parts a -> a #

minimum :: Ord a => Parts a -> a #

sum :: Num a => Parts a -> a #

product :: Num a => Parts a -> a #

Eq1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftEq :: (a -> b -> Bool) -> Parts a -> Parts b -> Bool #

Ord1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftCompare :: (a -> b -> Ordering) -> Parts a -> Parts b -> Ordering #

Traversable Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

traverse :: Applicative f => (a -> f b) -> Parts a -> f (Parts b) #

sequenceA :: Applicative f => Parts (f a) -> f (Parts a) #

mapM :: Monad m => (a -> m b) -> Parts a -> m (Parts b) #

sequence :: Monad m => Parts (m a) -> m (Parts a) #

Applicative Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

pure :: a -> Parts a #

(<*>) :: Parts (a -> b) -> Parts a -> Parts b #

liftA2 :: (a -> b -> c) -> Parts a -> Parts b -> Parts c #

(*>) :: Parts a -> Parts b -> Parts b #

(<*) :: Parts a -> Parts b -> Parts a #

Functor Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

fmap :: (a -> b) -> Parts a -> Parts b #

(<$) :: a -> Parts b -> Parts a #

NFData1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftRnf :: (a -> ()) -> Parts a -> () #

Hashable1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Parts a -> Int #

Generic1 Parts Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep1 Parts :: k -> Type #

Methods

from1 :: forall (a :: k). Parts a -> Rep1 Parts a #

to1 :: forall (a :: k). Rep1 Parts a -> Parts a #

Arbitrary a => Arbitrary (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

arbitrary :: Gen (Parts a) #

shrink :: Parts a -> [Parts a] #

Data a => Data (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Parts a -> c (Parts a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Parts a) #

toConstr :: Parts a -> Constr #

dataTypeOf :: Parts a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Parts a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Parts a)) #

gmapT :: (forall b. Data b => b -> b) -> Parts a -> Parts a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Parts a -> r #

gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Parts a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Parts a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Parts a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Parts a -> m (Parts a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Parts a -> m (Parts a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Parts a -> m (Parts a) #

Monoid a => Monoid (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

mempty :: Parts a #

mappend :: Parts a -> Parts a -> Parts a #

mconcat :: [Parts a] -> Parts a #

Semigroup a => Semigroup (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

(<>) :: Parts a -> Parts a -> Parts a #

sconcat :: NonEmpty (Parts a) -> Parts a #

stimes :: Integral b => b -> Parts a -> Parts a #

Bounded a => Bounded (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

minBound :: Parts a #

maxBound :: Parts a #

Generic (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Associated Types

type Rep (Parts a) :: Type -> Type #

Methods

from :: Parts a -> Rep (Parts a) x #

to :: Rep (Parts a) x -> Parts a #

Read a => Read (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Show a => Show (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

showsPrec :: Int -> Parts a -> ShowS #

show :: Parts a -> String #

showList :: [Parts a] -> ShowS #

NFData a => NFData (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

rnf :: Parts a -> () #

Eq a => Eq (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

(==) :: Parts a -> Parts a -> Bool #

(/=) :: Parts a -> Parts a -> Bool #

Ord a => Ord (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

compare :: Parts a -> Parts a -> Ordering #

(<) :: Parts a -> Parts a -> Bool #

(<=) :: Parts a -> Parts a -> Bool #

(>) :: Parts a -> Parts a -> Bool #

(>=) :: Parts a -> Parts a -> Bool #

max :: Parts a -> Parts a -> Parts a #

min :: Parts a -> Parts a -> Parts a #

Hashable a => Hashable (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

hashWithSalt :: Int -> Parts a -> Int #

hash :: Parts a -> Int #

MirrorHorizontal (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

MirrorVertical (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

Methods

mirrorVertical :: Parts a -> Parts a Source #

UnicodeCharacter (Parts Weight) Source # 
Instance details

Defined in Data.Char.Frame

UnicodeCharacter (Parts Bool) Source # 
Instance details

Defined in Data.Char.Frame

UnicodeText (Parts Weight) Source # 
Instance details

Defined in Data.Char.Frame

UnicodeText (Parts Bool) Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Parts Source # 
Instance details

Defined in Data.Char.Frame

type Rep1 Parts = D1 ('MetaData "Parts" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Parts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Vertical) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 Horizontal)))
type Rep (Parts a) Source # 
Instance details

Defined in Data.Char.Frame

type Rep (Parts a) = D1 ('MetaData "Parts" "Data.Char.Frame" "unicode-tricks-0.14.1.0-EInLeozqGjBL3vIQTNPsAm" 'False) (C1 ('MetaCons "Parts" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Vertical a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Horizontal a))))

Type aliasses and pattern synonyms for convenient Parts

type Simple = Parts Bool Source #

A type synonym that makes it more convenient to work with a Parts object that wraps Bools. Usually True means it should draw a line, and False that there is no line in that direction. The UnicodeCharacter instance of a Simple works by converting True to a Light, and vice versa.

type Weighted = Parts Weight Source #

A type synonym that makes it more convenient to work with a Parts object that wraps Weight objects. These specify the weight .

pattern Frame Source #

Arguments

:: 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 Parts pattern with the state of the given lines.

A pattern that makes pattern matching and expressions with Parts more convenient.

Functions to render specific frame values

simple Source #

Arguments

:: Simple

The given Simple frame to convert.

-> Char

The corresponding characer for this Simple frame.

Convert a Simple frame to a corresponding Char. Here True is mapped to a Light line.

simple' Source #

Arguments

:: Simple

The given Simple frame to convert.

-> Char

The corresponding characer for this Simple frame.

Convert a Simple frame to a corresponding Char. Here True is mapped to a Heavy line.

simpleWithArc Source #

Arguments

:: Simple

The given Simple frame to convert.

-> Char

The corresponding characer for this Simple frame.

Generate a Char where turns are done with an arc instead of a corner. This can only be done for Light lines.

weighted Source #

Arguments

:: Weighted

The Weighted object that specifies how the lines on the four directions should look like.

-> Char

The character that represents these lines.

Converts a given Weighted to the char that can be used to render frames.

Convert a Simple to a Weighted

simpleToWeighted Source #

Arguments

:: Weight

The Weight that is used for True values.

-> Simple

The Simple frame to convert.

-> Weighted

The resulting Weighted frame.

Convert a Simple frame to a Weighted frame by converting True to the given Weight value.

simpleToLight Source #

Arguments

:: Simple

The Simple frame to convert.

-> Weighted

The resulting Weighted frame.

Convert a Simple frame to a Weighted frame by converting True to Light.

simpleToHeavy Source #

Arguments

:: Simple

The 'Simple frame to convert.

-> Weighted

The resulting Weighted frame.

Convert a Simple frame to a Weighted frame by converting True to Heavy.

weightedToSimple Source #

Arguments

:: Weighted

The Weighted object to convert.

-> Simple

The Simple object that takes "True' for parts that were Light and Heavy; and False for Empty parts.

Convert a Weighted object to a Simple object by converting the Light and Heavy parts to True and the Empty parts to False.

Convert a Character to a frame

fromWeighted Source #

Arguments

:: Char

The given Character to convert to a Weighted object.

-> Maybe Weighted

A Weighted object wrapped in a Just if the character is a frame of Weights; Nothing otherwise.

Convert the given Character to a Parts object of Weight objects wrapped in a Just data constructor if it is a block character; Nothing otherwise.

fromWeighted' Source #

Arguments

:: Char

The given Character to convert.

-> Weighted

The equivalent Weighted object.

Convert the given Character to a Parts object of Weight objects. If the given Character is not a frame of Weights, the result is unspecified.

fromLight Source #

Arguments

:: Char

The given Character to convert to a Simple.

-> Maybe Simple

The equivalent Simple object wrapped in a Just data constructor if it exists; Nothing otherwise.

Convert the given Character to the equivalent Simple object wrapped in a Just data constructor if it exists; Nothing otherwise. The parts of the frame should only be Empty or Light, if it contains a Heavy object Nothing is returned.

fromLight' Source #

Arguments

:: Char

The given Character to convert.

-> Simple

The equivalent Simple object looking at Empty and Light parts.

Convert the given Character to the equivalent Simple object if it exists; unspecified output otherwise. The parts of the frame should only be Empty or Light.

fromHeavy Source #

Arguments

:: Char

The given Character to convert to a Simple.

-> Maybe Simple

The equivalent Simple object wrapped in a Just data constructor if it exists; Nothing otherwise.

Convert the given Character to the equivalent Simple object wrapped in a Just data constructor if it exists; Nothing otherwise. The parts of the frame should only be Empty or Heavy, if it contains a Light object Nothing is returned.

fromHeavy' Source #

Arguments

:: Char

The given Character to convert.

-> Simple

The equivalent Simple object looking at Empty and Heavy parts.

Convert the given Character to the equivalent Simple object if it exists; unspecified output otherwise. The parts of the frame should only be Empty or Heavy.

fromSimple Source #

Arguments

:: Char 
-> Maybe Simple

Ther equivalent Simple object wrapped in a Just data constructor if it exists; Nothing otherwise.

Convert the given Character to a Simple object wrapped in a Just if such Simple object exists; Nothing otherwise. Parts that are Light or Heavy are mapped to True, and parts that are Empty are mapped to False.

fromSimple' Source #

Arguments

:: Char

The given Character to convert'.

-> Simple

The equivalent Simple object if it exists.

Convert the given Character to a Simple, if no such Simple object exists, the output is unspecified. Parts that are Light or Heavy are mapped to True, and parts that are Empty are mapped to False.