
Hi all, has anybody already developed an EDSL for relational algebra? HaskellDB does that, but its current implementation only allows for generating SQL, are there other implementations? Günther

has anybody already developed an EDSL for relational algebra?
HaskellDB does that, but its current implementation only allows for generating SQL, are there other implementations?
Hello Günther, Ganesh did something called squiggle a while ago: http://code.haskell.org/squiggle/unstable/ I've done something similar but it's not published or hosted anywhere, so no link. Can upload it to code.haskell.org if you're interested. Both of our projects just generate SQL though, AFAIK. Was there something else you wanted to generate? Alistair

Hi Alistair,
Both of our projects just generate SQL though, AFAIK. Was there something else you wanted to generate?
I wish I could provide a clear answer to that myself, truth is I'm not certain myself at the moment. All this is related to a rl problem I have, it concerns the business logic of the app I wrote. I hindsight it occurred to me that the algorithm can be abstractly expressed in terms of relational algebra for which I need an EDSL. One concrete implementation could then be an interpreter / compiler to SQL, if I choose to use a database backend, and another implementation could be a interpretor to in-memory data structures (maps, whathaveyou), or a debugger to see if I have got the abstract algorithm right. I had made very good experience with HaskellDB, it was a great help, but the DSL of HaskellDB immediately translates to SQL, it's hardwired to do so. With the newer techniques for designing EDSLs ("finally tagless" in particular), I'm considering to roll one myself, and I suppose I'll also need HList to do so too. Quite a number of people on this list also use Haskell for rl applications, so I reason that someone must already have tried something similar. Günther
participants (2)
-
Alistair Bayley
-
Günther Schmidt