From: Alain C. <al...@po...> - 2008-01-30 22:56:15
|
Björn Bringert a écrit : > On Jan 30, 2008, at 19:01 , Justin Bailey wrote: > >> All, >> >> project doesn't easily let me add a few columns to an existing query >> (or take a few columns away). Instead, each use of project requires me >> to build the entire list of columns I'd like to pass on by hand. >> Before I go further, if there is a way to do that, please let me know. > > No, there is no existing way to achieve this. Indeed, it's one of the > most common complaints about HaskellDB :-) > > >> 3) If not 2, how can the solution above be better? I'd like to extend >> it to adding/removing arbitrary columns and more control over column >> order. > > The best way to do it would be to add powerful record types to Haskell... > > You may want to look at HList, http://homepages.cwi.nl/~ralf/HList/ > <http://homepages.cwi.nl/%7Eralf/HList/> I'm not sure how much HList > can do now, perhaps they have added things since they wrote the paper. > There might be some nice record manipulation stuff there that you > could use. Porting HaskellDB to use HList instead of its own records > would be nice, if the HList code is in good shape. > Hi, The HList library compiles with ghc-6.8.2, and seems to be maintained. Indeed it would be a great idea to use it instead of HaskellDB's own heterogeneous list system. Alain |