mx-state-codes-1.0.0.0: ISO 3166-2:MX State Codes and Names

Safe HaskellNone
LanguageHaskell2010

Data.MXStateCodes

Description

The Data.MXStateCodes module is used for enumerating, and rendering the ISO 3166-2:MX codes for Mexican States.

It is meant to be qualified when imported:

import qualified Data.MXStateCodes as MXStates
Synopsis

Documentation

data Code Source #

A Mexican State Code from ISO 3166-2:MX.

Constructors

AGU

Aguascalientes

BCN

Baja California

BCS

Baja California Sur

CAM

Campeche

CHH

Chihuahua

CHP

Chiapas

CMX

Ciudad de México

COA

Coahuila de Zaragoza

COL

Colima

DUR

Durango

GRO

Guerrero

GUA

Guanajuato

HID

Hidalgo

JAL

Jalisco

MEX

México

MIC

Michoacán de Ocampo

MOR

Morelos

NAY

Nayarit

NLE

Nuevo León

OAX

Oaxaca

PUE

Puebla

QUE

Querétaro

ROO

Quintana Roo

SIN

Sinaloa

SLP

San Luis Potosí

SON

Sonora

TAB

Tabasco

TAM

Tamaulipas

TLA

Tlaxcala

VER

Veracruz de Ignacio de la Llave

YUC

Yucatán

ZAC

Zacatecas

Instances
Bounded Code Source # 
Instance details

Defined in Data.MXStateCodes

Enum Code Source # 
Instance details

Defined in Data.MXStateCodes

Methods

succ :: Code -> Code #

pred :: Code -> Code #

toEnum :: Int -> Code #

fromEnum :: Code -> Int #

enumFrom :: Code -> [Code] #

enumFromThen :: Code -> Code -> [Code] #

enumFromTo :: Code -> Code -> [Code] #

enumFromThenTo :: Code -> Code -> Code -> [Code] #

Eq Code Source # 
Instance details

Defined in Data.MXStateCodes

Methods

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

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

Read Code Source # 
Instance details

Defined in Data.MXStateCodes

Show Code Source # 
Instance details

Defined in Data.MXStateCodes

Methods

showsPrec :: Int -> Code -> ShowS #

show :: Code -> String #

showList :: [Code] -> ShowS #

Generic Code Source # 
Instance details

Defined in Data.MXStateCodes

Associated Types

type Rep Code :: Type -> Type #

Methods

from :: Code -> Rep Code x #

to :: Rep Code x -> Code #

ToJSON Code Source # 
Instance details

Defined in Data.MXStateCodes

FromJSON Code Source # 
Instance details

Defined in Data.MXStateCodes

type Rep Code Source # 
Instance details

Defined in Data.MXStateCodes

type Rep Code = D1 (MetaData "Code" "Data.MXStateCodes" "mx-state-codes-1.0.0.0-1GBvUzrnopd5ysmZwPIp7g" False) (((((C1 (MetaCons "AGU" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "BCN" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "BCS" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CAM" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "CHH" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CHP" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "CMX" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "COA" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "COL" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "DUR" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "GRO" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GUA" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "HID" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "JAL" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MEX" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "MIC" PrefixI False) (U1 :: Type -> Type))))) :+: ((((C1 (MetaCons "MOR" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "NAY" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "NLE" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "OAX" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "PUE" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "QUE" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "ROO" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SIN" PrefixI False) (U1 :: Type -> Type)))) :+: (((C1 (MetaCons "SLP" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "SON" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "TAB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "TAM" PrefixI False) (U1 :: Type -> Type))) :+: ((C1 (MetaCons "TLA" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "VER" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "YUC" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ZAC" PrefixI False) (U1 :: Type -> Type))))))

all :: [Code] Source #

A list of every State Code.

toName :: Code -> Text Source #

Render a Code to it's English name.

fromName :: Text -> Maybe Code Source #

Parse a Code from an English name. This is case-insensitive.