
5 Feb
2007
5 Feb
'07
9:27 a.m.
On 2/5/07, Yitzchak Gale
J. Garrett Morris wrote:
First, we'll create a transformed version of the IO monad,
Why go to the trouble of creating a new monad? The existing ones are fine.
Mainly to keep the type error messages simpler. A project I was working on started with type S = StateT Blargh (ErrorT Fizzt IO) which was fine and dandy, although it produced somewhat verbose error messages. But then we added ContT to the stack, and the end result was that error messages tended to take more time giving the transformers than the errors. On the other hand, using a newtype the error messages were much easier to read. /g -- It is myself I have never met, whose face is pasted on the underside of my mind.