country-0.2.3.1: Country data type and functions
Safe HaskellSafe-Inferred
LanguageHaskell2010

Country.Unsafe

Description

This module provides the data constructor for a Country. While pattern matching on a country is perfectly safe, constructing one is not. There is an invariant the type system does not capture that the country number, as defined by ISO 3166-1, is between the inclusive bounds 0 and 999. Failure to maintain this invariant can cause other functions in this library to segfault.

Synopsis

Documentation

newtype Country Source #

A country recognized by ISO 3166.

Constructors

Country Word16 

Instances

Instances details
FromJSON Country Source # 
Instance details

Defined in Country.Unexposed.Names

ToJSON Country Source # 
Instance details

Defined in Country.Unexposed.Names

Data Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

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

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

toConstr :: Country -> Constr #

dataTypeOf :: Country -> DataType #

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

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

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

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

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

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

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

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

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

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

Storable Country Source # 
Instance details

Defined in Country.Unexposed.Names

Bounded Country Source # 
Instance details

Defined in Country.Unexposed.Names

Enum Country Source # 
Instance details

Defined in Country.Unexposed.Names

Generic Country Source # 
Instance details

Defined in Country.Unexposed.Names

Associated Types

type Rep Country :: Type -> Type #

Methods

from :: Country -> Rep Country x #

to :: Rep Country x -> Country #

Show Country Source # 
Instance details

Defined in Country.Unexposed.Names

NFData Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

rnf :: Country -> () #

Eq Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

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

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

Ord Country Source # 
Instance details

Defined in Country.Unexposed.Names

Hashable Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

hashWithSalt :: Int -> Country -> Int #

hash :: Country -> Int #

Prim Country Source # 
Instance details

Defined in Country.Unexposed.Names

type Rep Country Source # 
Instance details

Defined in Country.Unexposed.Names

type Rep Country = D1 ('MetaData "Country" "Country.Unexposed.Names" "country-0.2.3.1-6nZ7UbiucZ9C0Po2c1kw39" 'True) (C1 ('MetaCons "Country" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Word16)))