[Haskell-cafe] Associated Type Synonyms question

Ross Paterson ross at soi.city.ac.uk
Fri Feb 10 12:11:56 EST 2006

On Fri, Feb 10, 2006 at 05:20:47PM +0100, Niklas Broberg wrote:
> - when looking at the definition of MonadWriter the Monoid constraint
> is not strictly necessary, and none of the other mtl monads have
> anything similar. Is it the assumption that this kind of constraint is
> never really necessary, and thus no support for it is needed for ATS?

I think that's right -- it's only needed for the Monad instance for
WriterT.  But it is a convenience.  In any instance of MonadWriter, the
w will be a monoid, as there'll be a WriterT in the stack somewhere,
so the Monoid constraint just saves people writing general functions
with MonadWriter from having to add it.

More information about the Haskell-Cafe mailing list