unicode-tricks-0.6.0.0: Functions to work with unicode blocks more convenient.

Maintainerhapytexeu+gh@gmail.com
Stabilityexperimental
PortabilityPOSIX
Safe HaskellSafe
LanguageHaskell2010

Data.Char.Core

Contents

Description

This module defines data structures that are used in other modules, for example to rotate the characters.

Synopsis

Possible rotations

data Orientation Source #

The possible orientations of a unicode character, these can be horizontal, or vertical.

Constructors

Horizontal

Horizontal orientation.

Vertical

Vertical orientation.

Instances
Bounded Orientation Source # 
Instance details

Defined in Data.Char.Core

Enum Orientation Source # 
Instance details

Defined in Data.Char.Core

Eq Orientation Source # 
Instance details

Defined in Data.Char.Core

Ord Orientation Source # 
Instance details

Defined in Data.Char.Core

Read Orientation Source # 
Instance details

Defined in Data.Char.Core

Show Orientation Source # 
Instance details

Defined in Data.Char.Core

Arbitrary Orientation Source # 
Instance details

Defined in Data.Char.Core

data Rotate90 Source #

Possible rotations of a unicode character if that character can be rotated over 0, 90, 180, and 270 degrees.

Constructors

R0

No rotation.

R90

Rotation over 90 degrees.

R180

Rotation over 180 degrees.

R270

Rotation over 270 degrees.

Instances
Bounded Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Enum Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Eq Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Ord Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Read Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Show Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Arbitrary Rotate90 Source # 
Instance details

Defined in Data.Char.Core

Rotated objects

data Oriented a Source #

A data type that specifies that an item has been given an orientation.

Constructors

Oriented 

Fields

Instances
Functor Oriented Source # 
Instance details

Defined in Data.Char.Core

Methods

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

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

Foldable Oriented Source # 
Instance details

Defined in Data.Char.Core

Methods

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

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

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

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

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

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

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

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

toList :: Oriented a -> [a] #

null :: Oriented a -> Bool #

length :: Oriented a -> Int #

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

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

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

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

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

Traversable Oriented Source # 
Instance details

Defined in Data.Char.Core

Methods

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

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

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

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

Arbitrary1 Oriented Source # 
Instance details

Defined in Data.Char.Core

Methods

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

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

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

Defined in Data.Char.Core

Methods

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

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

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

Defined in Data.Char.Core

Methods

compare :: Oriented a -> Oriented a -> Ordering #

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

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

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

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

max :: Oriented a -> Oriented a -> Oriented a #

min :: Oriented a -> Oriented a -> Oriented a #

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

Defined in Data.Char.Core

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

Defined in Data.Char.Core

Methods

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

show :: Oriented a -> String #

showList :: [Oriented a] -> ShowS #

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

Defined in Data.Char.Core

Methods

arbitrary :: Gen (Oriented a) #

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

Ligating

data Ligate Source #

Specify if one should ligate, or not. When litigation is done characters that are normally written in two (or more) characters are combined in one character. For example instead of ⅠⅠⅠ.

Constructors

Ligate

A ligate operation is performed on the characters.

NoLigate

No ligate operation is performed on the charaters.

Instances
Bounded Ligate Source # 
Instance details

Defined in Data.Char.Core

Enum Ligate Source # 
Instance details

Defined in Data.Char.Core

Eq Ligate Source # 
Instance details

Defined in Data.Char.Core

Methods

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

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

Ord Ligate Source # 
Instance details

Defined in Data.Char.Core

Read Ligate Source # 
Instance details

Defined in Data.Char.Core

Show Ligate Source # 
Instance details

Defined in Data.Char.Core

Arbitrary Ligate Source # 
Instance details

Defined in Data.Char.Core

Default Ligate Source # 
Instance details

Defined in Data.Char.Core

Methods

def :: Ligate #

ligate :: (a -> a) -> Ligate -> a -> a Source #

Specify if the given ligate function should be performed on the input, if 'v:Ligate' is passed, and the identity function otherwise.

ligateF :: Functor f => (a -> a) -> Ligate -> f a -> f a Source #

Specify if the given ligate function is performed over the functor object if 'v:Ligate' is passed, and the identity function otherwise.

Types of fonts

data Emphasis Source #

A data type that lists the possible emphasis of a font. This can be Bold or NoBold the Default is NoBold.

Constructors

NoBold

The characters are not stressed with boldface.

Bold

The characters are stressed in boldface.

Instances
Bounded Emphasis Source # 
Instance details

Defined in Data.Char.Core

Enum Emphasis Source # 
Instance details

Defined in Data.Char.Core

Eq Emphasis Source # 
Instance details

Defined in Data.Char.Core

Ord Emphasis Source # 
Instance details

Defined in Data.Char.Core

Read Emphasis Source # 
Instance details

Defined in Data.Char.Core

Show Emphasis Source # 
Instance details

Defined in Data.Char.Core

Arbitrary Emphasis Source # 
Instance details

Defined in Data.Char.Core

Default Emphasis Source # 
Instance details

Defined in Data.Char.Core

Methods

def :: Emphasis #

data ItalicType Source #

A data type that can be used to specify if an italic character is used. The Default is NoItalic.

Constructors

NoItalic

No italic characters are used.

Italic

Italic characters are used.

Instances
Bounded ItalicType Source # 
Instance details

Defined in Data.Char.Core

Enum ItalicType Source # 
Instance details

Defined in Data.Char.Core

Eq ItalicType Source # 
Instance details

Defined in Data.Char.Core

Ord ItalicType Source # 
Instance details

Defined in Data.Char.Core

Read ItalicType Source # 
Instance details

Defined in Data.Char.Core

Show ItalicType Source # 
Instance details

Defined in Data.Char.Core

Arbitrary ItalicType Source # 
Instance details

Defined in Data.Char.Core

Default ItalicType Source # 
Instance details

Defined in Data.Char.Core

Methods

def :: ItalicType #

data FontStyle Source #

A data type that specifies if the font is with serifs or not. The 'Defaul;t' is Serif.

Constructors

SansSerif

The character is a character rendered without serifs.

Serif

The character is a character rendered with serifs.

Instances
Bounded FontStyle Source # 
Instance details

Defined in Data.Char.Core

Enum FontStyle Source # 
Instance details

Defined in Data.Char.Core

Eq FontStyle Source # 
Instance details

Defined in Data.Char.Core

Ord FontStyle Source # 
Instance details

Defined in Data.Char.Core

Read FontStyle Source # 
Instance details

Defined in Data.Char.Core

Show FontStyle Source # 
Instance details

Defined in Data.Char.Core

Arbitrary FontStyle Source # 
Instance details

Defined in Data.Char.Core

Default FontStyle Source # 
Instance details

Defined in Data.Char.Core

Methods

def :: FontStyle #

Character range checks

isAsciiAlphaNum :: Char -> Bool Source #

Checks if a character is an alphabetic or numerical character in ASCII. The characters 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz satisfy this predicate.

isAsciiAlpha :: Char -> Bool Source #

Checks if a charcter is an alphabetic character in ASCII. The characters ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz satisfy this predicate.