Haskell, Queries and Monad Comprehension

Hi all, is there anybody currently using Haskell to construct or implement a query language? I have read a couple of papers on "Monad Comprehension Calculus" and similar but none using Haskell nor any other existing programming language to build an actual implementation. Most papers give some sort of "Pseudo code", but I couldn't find any meat. Günther

2010/5/23 Günther Schmidt
is there anybody currently using Haskell to construct or implement a query language?
I've a half-baked, type-indexed (in HList style) implementation of relational algebra lying around somewhere, if that counts as a "query language". I was experimenting with using it as a sort of abstract collection interface, which actually worked rather nicely I think, but I didn't have time to flesh it out completely. In particular, only very simple queries and limited kinds of relation composition were supported. Definitely just toy code, though, and dreadfully inefficient; if you're looking for an "actual implementation" meaning "usable interface to an external persistence layer" then disregard this. - C.

I would be intrested in seeing this! Could you paste or upload it somewhere?
2010/5/24 C. McCann
2010/5/23 Günther Schmidt
: is there anybody currently using Haskell to construct or implement a query language?
I've a half-baked, type-indexed (in HList style) implementation of relational algebra lying around somewhere, if that counts as a "query language". I was experimenting with using it as a sort of abstract collection interface, which actually worked rather nicely I think, but I didn't have time to flesh it out completely. In particular, only very simple queries and limited kinds of relation composition were supported. Definitely just toy code, though, and dreadfully inefficient; if you're looking for an "actual implementation" meaning "usable interface to an external persistence layer" then disregard this.
- C. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

2010/5/23 Günther Schmidt
: is there anybody currently using Haskell to construct or implement a query language?
I've a half-baked, type-indexed (in HList style) implementation of relational algebra lying around somewhere, if that counts as a "query language". I was experimenting with using it as a sort of abstract collection interface, which actually worked rather nicely I think, but I didn't have time to flesh it out completely. In particular, only very simple queries and limited kinds of relation composition were supported. Definitely just toy code, though, and dreadfully inefficient; if you're looking for an "actual implementation" meaning "usable interface to an external persistence layer" then disregard this.
Well you're on the radar now :) BTW: I'm working on alternative, non-type-indexed version of extensible records (Which I have gathered to be an essential ingredient when you want to roll a Relational Algebra lib). There will be no first-class labels, but there also will be no need for singleton-types either (which is what you need with type-indexed solutions). And a bit less overhead all-around so it's kind making up for not having 1st class labels.

Günther, On May 24, 2010, at 03:20 , Günther Schmidt wrote:
Hi all,
is there anybody currently using Haskell to construct or implement a query language?
I have read a couple of papers on "Monad Comprehension Calculus" and similar but none using Haskell nor any other existing programming language to build an actual implementation.
Most papers give some sort of "Pseudo code", but I couldn't find any meat.
we are currently underway building the second version (as in: done right this time) of Ferry, a query compiler that (1) accepts queries over ordered, nested lists, (2) compiles these queries into an intermediate algebraic form, then (3) emits (small bundles of) SQL queries that evaluate the input query over your off-the-shelf RDBMS. We've used Ferry's first version to build new LINQ to SQL providers for Microsoft's LINQ as well as a new code generator for Phil Wadler's Links. The Ferry compiler itself is built in Haskell. Surf to www.ferry-lang.org for more information, screencasts, papers, talks, and contact us for more details. We will be happy to share Ferry's Haskell code once in digestable shape (soon). Cheers, --Torsten -- | Prof. Dr. Torsten Grust torsten.grust@uni-tuebingen.de | | www-db.informatik.uni-tuebingen.de | | Database Systems - Universität Tübingen (Germany) |
participants (5)
-
C. McCann
-
Felipe Lessa
-
Günther Schmidt
-
Markus Läll
-
Torsten Grust