[Haskell-cafe] Re: Using the ContT monads for early exits of IO ?

Job Vranish job.vranish at gmail.com
Thu Jun 10 16:18:29 EDT 2010


Yeah, I might actually prefer calling it EitherT instead of ErrorT. It
doesn't have to be used for error, it's just what it is most often used for.

- Job

On Thu, Jun 10, 2010 at 3:57 PM, Maciej Piechotka <uzytkownik2 at gmail.com>wrote:

> On Thu, 2010-06-10 at 14:09 -0500, Tim Wawrzynczak wrote:
> > Actually, on second thought, Lennart is probably right.  Continuations
> > are probably overkill for this situation.
> > Since not wanting to continue is probably an 'erroneous condition,'
> > you may as well use Error.
> >
> > Cheers,
> >  - Tim
> >
>
> Technically it can be a success. For example if we get a list of
> HostInfo for given hostname we want to connect once instead of many
> times. Also the first time might not succeed (it is AAAA entry in IPv4
> network).
>
> Error monad seems not to be a semantic solution as we exit on success
> not failure.
>
> Regards
>
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100610/69c3a2ee/attachment.html


More information about the Haskell-Cafe mailing list