Re: Stricter WriterT (Part II)

Presumably we'll also need
writerT :: m (a, w) -> WriterT w m a
Yes, we would need that, too: writerT m = WriterT $ \w -> do (a, w') <- m let wt = mappend w w' wt `seq` return (a, wt)
Is there any reason to keep Control.Monad.Trans.Writer.Strict, or should this replace it?
If we replace the old one, it will break existing code that used the `WriterT` constructor. Same thing for the strict RWST constructor if we similarly modify that. However, I don't know exactly how many packages use those constructors. I will try to do a text search of Hackage this coming weekend to check and see if it is feasible to ask downstream packages that use `WriterT`/`RWST` constructors to set upper bounds on `transformers`.

I use them fairly heavily, mostly so I can make packages that work with
arbitrary transformer stacks.
I'd be willing to endure the pain of using #if
MIN_VERSION_transformers(x,y,z) bracketing around the use of Strict.WriterT
and Strict.RWST constructors so long as there were writerT/runWriterT and
rwsT/runRWST analogues I could simply invoke.
-Edward
On Tue, Mar 19, 2013 at 11:07 AM, Gabriel Gonzalez
Presumably we'll also need
writerT :: m (a, w) -> WriterT w m a
Yes, we would need that, too:
writerT m = WriterT $ \w -> do (a, w') <- m let wt = mappend w w' wt `seq` return (a, wt)
Is there any reason to keep Control.Monad.Trans.Writer.**Strict, or
should this replace it?
If we replace the old one, it will break existing code that used the `WriterT` constructor. Same thing for the strict RWST constructor if we similarly modify that. However, I don't know exactly how many packages use those constructors. I will try to do a text search of Hackage this coming weekend to check and see if it is feasible to ask downstream packages that use `WriterT`/`RWST` constructors to set upper bounds on `transformers`.
______________________________**_________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/**mailman/listinfo/librarieshttp://www.haskell.org/mailman/listinfo/libraries
participants (2)
-
Edward Kmett
-
Gabriel Gonzalez