roc-id-0.2.0.0: Implementation of the ROC (Taiwan) National ID standard.
Safe HaskellSafe-Inferred
LanguageHaskell2010

ROC.ID.Location

Synopsis

Documentation

data Location Source #

A location, encodable within an ROC identification number.

To generate the name of a Location, use the printLocation function.

To parse a Location, use the parseLocation function.

To generate a random Location, use the randomLocation function.

Constructors

A

臺北市 Taipei City

B

臺中市 Taichung City

C

基隆市 Keelung City

D

臺南市 Tainan City

E

高雄市 Kaohsiung City

F

新北市 New Taipei City

G

宜蘭縣 Yilan County

H

桃園市 Taoyuan City

I

嘉義市 Chiayi City

J

新竹縣 Hsinchu County

K

苗栗縣 Miaoli County

L

臺中縣 Taichung County

M

南投縣 Nantou County

N

彰化縣 Changhua County

O

新竹市 Hsinchu City

P

雲林縣 Yunlin County

Q

嘉義縣 Chiayi County

R

臺南縣 Pingtung County

S

高雄縣 Kaohsiung County

T

屏東縣 Pingtung County

U

花蓮縣 Hualien County

V

臺東縣 Taitung County

W

金門縣 Kinmen County

X

澎湖縣 Penghu County

Y

陽明山 Yangmingshan

Z

連江縣 Lienchiang County

Instances

Instances details
Bounded Location Source # 
Instance details

Defined in ROC.ID.Location

Enum Location Source # 
Instance details

Defined in ROC.ID.Location

Generic Location Source # 
Instance details

Defined in ROC.ID.Location

Associated Types

type Rep Location :: Type -> Type #

Methods

from :: Location -> Rep Location x #

to :: Rep Location x -> Location #

Read Location Source # 
Instance details

Defined in ROC.ID.Location

Show Location Source # 
Instance details

Defined in ROC.ID.Location

Eq Location Source # 
Instance details

Defined in ROC.ID.Location

Ord Location Source # 
Instance details

Defined in ROC.ID.Location

type Rep Location Source # 
Instance details

Defined in ROC.ID.Location

type Rep Location = D1 ('MetaData "Location" "ROC.ID.Location" "roc-id-0.2.0.0-9iaNsKOWrI31QYojWhIb3O" '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))))))

parseLocation :: Char -> Maybe Location Source #

Parse the specified uppercase alphabetic character as a Location.

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

printLocation :: Language -> Location -> Text Source #

Pretty-print the specified Location.

randomLocation :: MonadRandom m => m Location Source #

Generate a random Location.