ANNOUNCE: Facts

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

ANNOUNCE: Facts

Alexander Solla-2

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 DataEqOrdShow, 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 DataEqOrdShow, and Typeable, and use explicit exports to only export queries and their atoms. For now, we will add facts to the hierarchy lazily, as our projects need them.


_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: ANNOUNCE: Facts

Henk-Jan van Tuyl
On Thu, 14 Oct 2010 04:15:53 +0200, Alexander Solla <[hidden email]> wrote:

> The Facts hierarchy is meant to contain commonly used, relatively
> static facts about the "real world".

The list of countries is maybe less static then you would think; since  
last Sunday, the Netherlands Antilles does not exist anymore; instead  
there are two new countries: Curaçao and St. Maarten [0].

Regards,
Henk-Jan van Tuyl


[0]  
http://csmenetwork.com/2/index.php?option=com_content&view=article&id=9643:dutch-curacao-and-st-maarten-now-independent&catid=122:csme-network-latest&Itemid=211


--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--
_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe
Reply | Threaded
Open this post in threaded view
|

Re: ANNOUNCE: Facts

Alexander Solla-2

On Oct 14, 2010, at 3:00 PM, Henk-Jan van Tuyl wrote:

> The list of countries is maybe less static then you would think;  
> since last Sunday, the Netherlands Antilles does not exist anymore;  
> instead there are two new countries: Curaçao and St. Maarten [0]

Thanks for the update.  I'l put it in the errata.  However, I'm  
following the U.N. recommended list of country names, which hasn't  
been updated since August 2009.  I emailed the Working Group on  
Country Names about it a few minutes ago.

-Alex_______________________________________________
Haskell-Cafe mailing list
[hidden email]
http://www.haskell.org/mailman/listinfo/haskell-cafe