summaryrefslogtreecommitdiff
path: root/src/Data/StateCodes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Data/StateCodes.hs')
-rw-r--r--src/Data/StateCodes.hs23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/Data/StateCodes.hs b/src/Data/StateCodes.hs
new file mode 100644
index 0000000..514e66c
--- /dev/null
+++ b/src/Data/StateCodes.hs
@@ -0,0 +1,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