Yair Chuchem wrote: > A new "generator" package has been uploaded to Hackage. > It implements an alternative list monad transformer, a list class, and > related functions.
This, and just about all of the other "similar" types mentioned in this thread, are all new names for the venerable "ListT Done Right" that has been around for many years: http://www.haskell.org/haskellwiki/ListT_done_right The ListT that is (still, unbelievably) in the mtl package is very broken, and shouldn't be used. It's not even a monad - it doesn't satisfy the monad laws. So why make up new names? Just call it ListT. I agree, ListT is a very nice approach. Perhaps that is why this wheel has been re-invented so many times, many more even than what has been brought up in this thread. Unfortunately, given the way the standard libraries are currently implemented in GHC, ListT IO cannot be made exception-safe, so ListT has limited usefulness for real software. The main problem is the type of the primitives (un)blockAsyncExceptions# which makes it possible to block exceptions only in IO itself, not in transformations of IO. That, in turn, makes it impossible to implement things like bracket and finally in transformations of IO. What we need is something like startBlocking :: IO () stopBlocking :: IO () Regards, Yitz _______________________________________________ Haskell mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell
