[Haskell-cafe] Using the ContT monads for early exits of IO ?
aditya.siram at gmail.com
Thu Jun 10 11:38:37 EDT 2010
I have a general question about this kind of approach. Tutorials on
continuations in Haskell always come with a warning about not using it
unless you have to because it makes code unreadable and
unmaintainable. Is this true in your opinion?
On 6/10/10, Job Vranish <job.vranish at gmail.com> wrote:
> Yeah I don't see why not. The ContT monad should work great.
> Also, depending on what you're doing, the ErrorT monad might do what you
> want as well.
> - Job
> 2010/6/10 Günther Schmidt <gue.schmidt at web.de>
>> Hi everyone,
>> I'm about to write a rather lengthy piece of IO code. Depending on the
>> results of some of the IO actions I'd like the computation to stop right
>> there and then.
>> Now I know in general how to write this but I'm wondering if this is one
>> those occasions where I should make use of the Cont monad to make an early
>> Haskell-Cafe mailing list
>> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe