[Haskell-cafe] bug in all about monads tutorial

Peter Hercek phercek at gmail.com
Sun Jan 20 07:39:04 EST 2008


Hi,

About 3 weeks ago I reported this bug to Jeff Newbern.
  But I got no response - maybe I got filtered out as spam :)
  Since it was not fixed I'm trying once more here. Maybe
  there is somebody here who has access to the web site
  http://www.haskell.org/all_about_monads and cares enough
  to fix it.

On page
  http://www.haskell.org/all_about_monads/html/writermonad.html
there is "listens" defined like this:
  listens f m = do (a,w) <- m; return (a,f w)
... but it should be like this:
  listens f m = do (a,w) <- listen m; return (a,f w)
... or maybe a less strict option (as ghc libs have it):
  listens f m = do ~(a,w) <- listen m; return (a,f w)

Peter.



More information about the Haskell-Cafe mailing list