| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.StateCodes
Description
Main entry point, exposing all that needs to be
Documentation
Constructors
| AL | Alabama |
| AK | Alaska |
| AZ | Arizona |
| AR | Arkansas |
| CA | California |
| CO | Colorado |
| CT | Connecticut |
| DE | Delaware |
| FL | Florida |
| GA | Georgia |
| HI | Hawaii |
| ID | Idaho |
| IL | Illinois |
| IN | Indiana |
| IA | Iowa |
| KS | Kansas |
| KY | Kentucky |
| LA | Louisiana |
| ME | Maine |
| MD | Maryland |
| MA | Massachusetts |
| MI | Michigan |
| MN | Minnesota |
| MS | Mississippi |
| MO | Missouri |
| MT | Montana |
| NE | Nebraska |
| NV | Nevada |
| NH | New Hampshire |
| NJ | New Jersey |
| NM | New Mexico |
| NY | New York |
| NC | North Carolina |
| ND | North Dakota |
| OH | Ohio |
| OK | Oklahoma |
| OR | Oregon |
| PA | Pennsylvania |
| RI | Rhode Island |
| SC | South Carolina |
| SD | South Dakota |
| TN | Tennessee |
| TX | Texas |
| UT | Utah |
| VT | Vermont |
| VA | Virginia |
| WA | Washington |
| WV | West Virginia |
| WI | Wisconsin |
| WY | Wyoming |
| DC | District of Columbia |
| AS | American Samoa |
| GU | Guam |
| MP | Northern Mariana Islands |
| PR | Puerto Rico |
| UM | United States Minor Outlying Islands |
| VI | Virgin Islands, U.S. |
Instances
| Bounded StateCode Source # | |
| Enum StateCode Source # | |
| Eq StateCode Source # | |
| Ord StateCode Source # | |
| Read StateCode Source # | |
| Show StateCode Source # | |
| ToJSON StateCode Source # | To JSON: as a simple string |
| FromJSON StateCode Source # | From JSON: as a simple string |
| RenderMessage master StateCode Source # | Show state readable name, in English (ignoring locale for now) |
stateList :: [(Text, StateCode)] Source #
List of names sorted by alphabetical order, with state code this is ready to be used in a yesod selectField, for example
fromName :: Text -> StateCode Source #
Get the state code from the state readable name. Errors if the name is unknown