country-0.1.3: 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

Eq Country Source # 

Methods

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

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

Ord Country Source # 
Show Country Source # 
Hashable Country Source # 

Methods

hashWithSalt :: Int -> Country -> Int #

hash :: Country -> Int #

ToJSON Country Source # 
FromJSON Country Source # 
Prim Country Source #