country-0.1.6: Country data type and functions

Safe HaskellNone
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
Bounded Country Source # 
Instance details

Defined in Country.Unexposed.Names

Enum Country Source # 
Instance details

Defined in Country.Unexposed.Names

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

Show Country Source # 
Instance details

Defined in Country.Unexposed.Names

Generic Country Source # 
Instance details

Defined in Country.Unexposed.Names

Associated Types

type Rep Country :: * -> * #

Methods

from :: Country -> Rep Country x #

to :: Rep Country x -> Country #

Hashable Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

hashWithSalt :: Int -> Country -> Int #

hash :: Country -> Int #

ToJSON Country Source # 
Instance details

Defined in Country.Unexposed.Names

FromJSON Country Source # 
Instance details

Defined in Country.Unexposed.Names

Storable Country Source # 
Instance details

Defined in Country.Unexposed.Names

NFData Country Source # 
Instance details

Defined in Country.Unexposed.Names

Methods

rnf :: Country -> () #

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.1.6-4f7pWtzGosxLow35UwcpLv" True) (C1 (MetaCons "Country" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Word16)))