[Haskell-cafe] Re: not possible with monad transformers ?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Tue Nov 30 19:37:16 EST 2004

Ben Rudiak-Gould <Benjamin.Rudiak-Gould at cl.cam.ac.uk> writes:

> I may be confused, but I don't think it does. It seems like the OP
> wants a type like
>     data Perhaps a = Success a | Failure [Error]

When writing a compiler, it makes sense to collect errors as by the
writer monad, and not abort anything - producing dummy values instead
(except perhaps some fatal errors when it's inconvenient).

   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/

More information about the Haskell-Cafe mailing list