Facts: A collection of facts about the real world.
The Facts hierarchy is meant to contain commonly used, relatively static facts about the "real world". The facts are meant to be encoded using relatively simple Haskell constructs. However, we do make some promises: every data type our modules export will have instances of Data
, Eq
, Ord
, Show
, andTypeable
. We will use explicit module export lists to control access to internal data structures.
As much of the data we are encoding is tabular, we use simple structures like lists and maps to encode the relations. This has two practical ramifications: the textual representation of the data can be very wide, but are also very easy to edit, with "block editing" tools like Vi's visual block mode. The other consequence is that the naive approach to writing queries can be tedious, and the resulting naive queries are slower than they could be. Template Haskell can eliminate much of this drudgery. Felipe Lessa has graciously donated some Template Haskell code which we have adapted.
The Facts.* hierarchy currently contains modules with geographical information, such as a data type of countries, cross references to various ISO-3166-1 names for each, a list of states in the United States, and the United States address format. Please see the module hierarchy for more specifics. Patches are welcomed, though prospective contributors are encouraged to encode data structures using lists of pairs to encode bijections, all exposed data types are instances of Data
, Eq
, Ord
, Show
, and Typeable
, and to use explicit exports to only export queries and their input and output types and constructors. For now, we will add facts to the hierarchy lazily, as our projects need them.
Modules
[Index]
Downloads
- Facts-0.1.2.tar.gz [browse] (Cabal source package)
- Package description (as included in the package)
Maintainer's Corner
For package maintainers and hackage trustees
Candidates
- No Candidates
Versions [RSS] | 0.1, 0.1.1, 0.1.2 |
---|---|
Dependencies | AC-Angle (==1.0), base (>4 && <5), containers (>=0.3 && <0.4), digits (>=0.2 && <0.3), QuickCheck (>=2 && <3), template-haskell (>=2.4 && <2.5) [details] |
Tested with | ghc ==6.12.1 |
License | BSD-3-Clause |
Copyright | © 2010 2piix.com |
Author | Alexander Solla |
Maintainer | ajs@2piix.com |
Category | Factual |
Source repo | head: darcs get http://code.haskell.org/Facts/ |
Uploaded | by AlexanderSolla at 2010-10-18T06:06:06Z |
Distributions | |
Reverse Dependencies | 1 direct, 0 indirect [details] |
Downloads | 3198 total (7 in the last 30 days) |
Rating | (no votes yet) [estimated by Bayesian average] |
Your Rating | |
Status | Docs uploaded by user Build status unknown [no reports yet] |