@@ -1,4 +1,3 @@
1−{-# LANGUAGE CPP #-}
21{-# LANGUAGE DeriveGeneric #-}
32{-# LANGUAGE MultiParamTypeClasses #-}
43{-# LANGUAGE TypeFamilies #-}
@@ -29,10 +28,6 @@ module Control.Monad.Trans.Ether.Writer
2928 , pass
3029 ) where
3130
32−#if __GLASGOW_HASKELL__ < 710
33−import Data.Monoid
34−#endif
35−
3631import GHC.Prim (Proxy#)
3732import Data.Functor.Identity (Identity(..))
3833import qualified Control.Monad.Trans.Writer.Lazy as Trans
@@ -86,22 +81,10 @@ tell :: Monad m => Proxy# tag -> w -> WriterT tag w m ()
8681tell t w = writer t ((), w)
8782
8883-- | Executes an action and adds its accumulator to the value of the computation.
89−listen
90−#if __GLASGOW_HASKELL__ < 800
91− :: (Monad m, Monoid w)
92−#else
93− :: Monad m
94−#endif
95− => Proxy# tag -> WriterT tag w m a -> WriterT tag w m (a, w)
84+listen :: Monad m => Proxy# tag -> WriterT tag w m a -> WriterT tag w m (a, w)
9685listen _ = pack . Trans.listen . unpack
9786
9887-- | Executes an action which returns a value and a function, and returns the
9988-- value, applying the function to the accumulator.
100−pass
101−#if __GLASGOW_HASKELL__ < 800
102− :: (Monad m, Monoid w)
103−#else
104− :: Monad m
105−#endif
106− => Proxy# tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
89+pass :: Monad m => Proxy# tag -> WriterT tag w m (a, w -> w) -> WriterT tag w m a
10790pass _ = pack . Trans.pass . unpack