On Sun, Feb 12, 2006 at 09:32:14PM +0100, Niklas Broberg wrote: > Irrelevant to the discussion above, but I wonder whether the Monoid > constraint should really be there on MonadWriter. I could imagine lots > of interesting applications of writer monads that don't output a > monoid, an example would be a monad that iteratively computes a result > of better and better precision and "tells" the result of each step > until told to stop. In this case the merging would not be mplus but to > always throw away the old argument (flip const).
You also need a value for return. Then the monad laws will ensure that you have another monoid. _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
