summaryrefslogtreecommitdiff
path: root/src/Data/StateCodes.hs
diff options
context:
space:
mode:
authoracamino <>2017-08-23 04:49:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2017-08-23 04:49:00 (GMT)
commit4883a567c0ca61112a8afe670ddb5c7a81d369c1 (patch)
tree8f16e419b0b474da3da9a6e7e74940f06460a634 /src/Data/StateCodes.hs
version 0.1.00.1.0
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