[project @ 2003-08-20 10:22:44 by simonmar]
[haskell-directory.git] / Control / Monad / Writer.hs
index 0ef1ab0..de66eb4 100644 (file)
@@ -7,14 +7,14 @@
 -- 
 -- Maintainer  :  libraries@haskell.org
 -- Stability   :  experimental
--- Portability :  non-portable ( mulit-param classes, functional dependencies )
+-- Portability :  non-portable (multi-param classes, functional dependencies)
 --
 -- The MonadWriter class.
 --
 --       Inspired by the paper
 --       /Functional Programming with Overloading and
 --           Higher-Order Polymorphism/, 
---         Mark P Jones (<http://www.cse.ogi.edu/~mpj>)
+--         Mark P Jones (<http://www.cse.ogi.edu/~mpj/>)
 --               Advanced School of Functional Programming, 1995.
 -----------------------------------------------------------------------------
 
@@ -23,26 +23,24 @@ module Control.Monad.Writer (
        listens,
        censor,
        Writer(..),
-       runWriter,
        execWriter,
        mapWriter,
        WriterT(..),
-       runWriterT,
        execWriterT,
        mapWriterT,
        module Control.Monad,
-       module Control.Monad.Monoid,
        module Control.Monad.Fix,
        module Control.Monad.Trans,
+       module Data.Monoid,
   ) where
 
 import Prelude
 
 import Control.Monad
-import Control.Monad.Monoid
 import Control.Monad.Fix
 import Control.Monad.Trans
 import Control.Monad.Reader
+import Data.Monoid
 
 -- ---------------------------------------------------------------------------
 -- MonadWriter class
@@ -61,7 +59,7 @@ class (Monoid w, Monad m) => MonadWriter w m | m -> w where
        listen :: m a -> m (a, w)
        pass   :: m (a, w -> w) -> m a
 
-listens :: (MonadWriter w m) => (w -> w) -> m a -> m (a, w)
+listens :: (MonadWriter w m) => (w -> b) -> m a -> m (a, b)
 listens f m = do
        (a, w) <- listen m
        return (a, f w)