summaryrefslogtreecommitdiff
path: root/src/Data/StateCodes.hs
blob: 514e66ca750fb5027dfd9cd11d014b01a5aff39f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- | Main entry point, exposing all that needs to be

module Data.StateCodes
  ( StateCode(..)
  , allNames
  , stateList
  , fromMName
  , fromMText
  , fromName
  , fromText
  , toName
  , toText
  ) where

import           Control.Arrow              ((&&&))
import           Data.Text                  (Text)

import           Data.StateCodes.ISO31662US

-- | List all codes with names

allNames :: [(StateCode, Text)]
allNames = map (id &&& toName) $ enumFrom minBound