@@ -1,4 +1,3 @@
2{-# LANGUAGE DeriveGeneric #-}
1{-# LANGUAGE DeriveGeneric #-}
3{-# LANGUAGE MultiParamTypeClasses #-}
2{-# LANGUAGE MultiParamTypeClasses #-}
4{-# LANGUAGE TypeFamilies #-}
3{-# LANGUAGE TypeFamilies #-}
@@ -29,10 +28,6 @@ module Control.Monad.Trans.Ether.Writer
32−#if __GLASGOW_HASKELL__ < 710
36import GHC.Prim (Proxy#)
31import GHC.Prim (Proxy#)
37import Data.Functor.Identity (Identity(..))
32import Data.Functor.Identity (Identity(..))
38import qualified Control.Monad.Trans.Writer.Lazy as Trans
33import qualified Control.Monad.Trans.Writer.Lazy as Trans
@@ -86,22 +81,10 @@ tell :: Monad m => Proxy# tag -> w -> WriterT tag w m ()
86tell t w = writer t ((), w)
81tell t w = writer t ((), w)
88-- | Executes an action and adds its accumulator to the value of the computation.
83-- | Executes an action and adds its accumulator to the value of the computation.
90−#if __GLASGOW_HASKELL__ < 800
91− :: (Monad m, Monoid w)
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)
96listen _ = pack . Trans.listen . unpack
85listen _ = pack . Trans.listen . unpack
98-- | Executes an action which returns a value and a function, and returns the
87-- | Executes an action which returns a value and a function, and returns the
99-- value, applying the function to the accumulator.
88-- value, applying the function to the accumulator.
101−#if __GLASGOW_HASKELL__ < 800
102− :: (Monad m, Monoid w)
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
107pass _ = pack . Trans.pass . unpack
90pass _ = pack . Trans.pass . unpack