Hi,
I've put the code that I wish to transform from using exceptions to using
continuations on hpaste:
?http://hpaste.org/fastcgi/hpaste.fcgi/view?id=6515#a6515
thanks
Günther
Am 04.07.2009, 01:11 Uhr, schrieb Günther Schmidt <gue.schm...@web.de>:
Hi,
I've got an IO action, some file system IO, traversing one level only
and iterating over files found. I wish to build in an "early" exit, ie.
if an IO action in the loop encounters a particular value I want it to
abort the loop.
Now so far, pls don't shoot, I have done this by throwing IO Exceptions
and catching them. I'm trying to rewrite this using Continuatios /
callCC but can't figure out where to place what.
I certainly don't have the intuition yet and funny enough not even in
RWH I could find some Cont/ContT examples.
Would someone please draw me an example?
Günther
--
Erstellt mit Operas revolutionärem E-Mail-Modul: http://www.opera.com/mail/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe