On May 15, 2007, at 14:52 , Tomasz Zielonka wrote:

On Tue, May 15, 2007 at 02:27:13PM +0200, Arie Peterson wrote:
Hi Tomek!

Hi!

Have you considered changing the statements to have type 'ReaderT Database
IO ()'? Then (>>) actually does what you want.

I tried it and it made the code simpler, more readable and of course
more immune to this type of bugs. Thanks!


I use the same idea in Hope (http://hope.bringert.net/), with a newtype DatabaseT, and a typeclass MonadDatabase, and lifted versions of the HaskellDB database operations. The code is in the first part of this module: http://www.cs.chalmers.se/~bringert/darcs/hope/Hope/ DatabaseT.hs

Perhaps this should be added to HaskellDB?

/Björn

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to