taiwan-id
Safe HaskellNone
LanguageHaskell2010

Taiwan.ID.Letter

Synopsis

Documentation

data Letter Source #

Represents a letter in the latin alphabet.

Constructors

A 
B 
C 
D 
E 
F 
G 
H 
I 
J 
K 
L 
M 
N 
O 
P 
Q 
R 
S 
T 
U 
V 
W 
X 
Y 
Z 

Instances

Instances details
Finitary Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Associated Types

type Cardinality Letter 
Instance details

Defined in Taiwan.ID.Letter

type Cardinality Letter = GCardinality (Rep Letter)
Eq Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Methods

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

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

Ord Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Bounded Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Enum Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Generic Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Associated Types

type Rep Letter 
Instance details

Defined in Taiwan.ID.Letter

type Rep Letter = D1 ('MetaData "Letter" "Taiwan.ID.Letter" "taiwan-id-0.1.1.4-inplace" 'False) ((((C1 ('MetaCons "A" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "B" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "C" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "D" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "E" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "F" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "G" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "H" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "I" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "J" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "K" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "M" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "N" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "O" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "P" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Q" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "S" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "T" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "U" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "V" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "W" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "X" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Y" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Z" 'PrefixI 'False) (U1 :: Type -> Type))))))

Methods

from :: Letter -> Rep Letter x #

to :: Rep Letter x -> Letter #

Read Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

Show Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

type Cardinality Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

type Cardinality Letter = GCardinality (Rep Letter)
type Rep Letter Source # 
Instance details

Defined in Taiwan.ID.Letter

type Rep Letter = D1 ('MetaData "Letter" "Taiwan.ID.Letter" "taiwan-id-0.1.1.4-inplace" 'False) ((((C1 ('MetaCons "A" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "B" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "C" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "D" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "E" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "F" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "G" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "H" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "I" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "J" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "K" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "L" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "M" 'PrefixI 'False) (U1 :: Type -> Type))))) :+: (((C1 ('MetaCons "N" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "O" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "P" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "Q" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "R" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "S" 'PrefixI 'False) (U1 :: Type -> Type)))) :+: ((C1 ('MetaCons "T" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "U" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "V" 'PrefixI 'False) (U1 :: Type -> Type))) :+: ((C1 ('MetaCons "W" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "X" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "Y" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Z" 'PrefixI 'False) (U1 :: Type -> Type))))))

fromChar :: Char -> Maybe Letter Source #

Attempts to parse a Letter from a character.

Returns Nothing if the specified character is not an uppercase alphabetic character.

toChar :: Letter -> Char Source #

Converts the specified Letter to a character.

generate :: MonadRandom m => m Letter Source #

Generates a random Letter.

type family FromChar (c :: Char) :: Maybe Letter where ... Source #

Equations

FromChar 'A' = 'Just 'A 
FromChar 'N' = 'Just 'N 
FromChar 'B' = 'Just 'B 
FromChar 'O' = 'Just 'O 
FromChar 'C' = 'Just 'C 
FromChar 'P' = 'Just 'P 
FromChar 'D' = 'Just 'D 
FromChar 'Q' = 'Just 'Q 
FromChar 'E' = 'Just 'E 
FromChar 'R' = 'Just 'R 
FromChar 'F' = 'Just 'F 
FromChar 'S' = 'Just 'S 
FromChar 'G' = 'Just 'G 
FromChar 'T' = 'Just 'T 
FromChar 'H' = 'Just 'H 
FromChar 'U' = 'Just 'U 
FromChar 'I' = 'Just 'I 
FromChar 'V' = 'Just 'V 
FromChar 'J' = 'Just 'J 
FromChar 'W' = 'Just 'W 
FromChar 'K' = 'Just 'K 
FromChar 'X' = 'Just 'X 
FromChar 'L' = 'Just 'L 
FromChar 'Y' = 'Just 'Y 
FromChar 'M' = 'Just 'M 
FromChar 'Z' = 'Just 'Z 
FromChar _1 = 'Nothing :: Maybe Letter