I wrote:
Why go to the trouble of creating a new monad?
The existing ones are fine.

J. Garrett Morris wrote:
Mainly to keep the type error messages simpler.

There are two ways to get around that problem:

1. Make your functions polymorphic, using
MonadState, MonadError, etc. Each function
mentions only the capabilities that it needs,
without having the whole monad stack in its type.

2. Use a type alias for the monad stack.

(There are other big advantages of both of these.)

Regards,
Yitz
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to