Proposal: merge either into transformers
Niklas Hambüchen
mail at nh2.me
Sun Apr 27 01:31:47 UTC 2014
While I think that we should follow PHP's good example and call such a
potential new module Control.Monad.Trans.Writer.Really_Strict, would
there be actual drawbacks for changing Writer.Strict to Gabriel's
suggestions?
On Sun 27 Apr 2014 00:51:40 BST, Ross Paterson wrote:
> On Sat, Apr 26, 2014 at 11:29:01PM +0300, Roman Cheplyaka wrote:
>> I don't understand the issue here. Why does it have to be abstract or
>> based on StateT?
>>
>> We could simply make a new module with the same WriterT type and the instance
>>
>> instance (Monoid w, Monad m) => Monad (WriterT w m) where
>> m >>= k = WriterT $ do
>> (a, w) <- runWriterT m
>> (b, w') <- runWriterT (k a)
>> let w'' = w `mappend` w'
>> w'' `seq` return (b, w'')
>
> See Gabriel's analysis:
>
> http://www.haskell.org/pipermail/libraries/2013-March/019528.html
>
> The above is version #2 there.
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries
More information about the Libraries
mailing list