Re: IO StateTransformer with an escape clause

2003-09-01 Thread Ganesh Sittampalam
On Tue, 26 Aug 2003 14:33:28 +1000, "Thomas L. Bevan" <[EMAIL PROTECTED]> wrote: >Hi, > >I'd like some help building an IO StateTransformer which can be escaped midway >through without losing the state accummulated up to that point. >I tried constructing a > StateT s MaybeIO a monad but the state

Re: IO StateTransformer with an escape clause

2003-08-27 Thread Andrew J Bromage
G'day all. On Tue, Aug 26, 2003 at 02:33:28PM +1000, Thomas L. Bevan wrote: > I'd like some help building an IO StateTransformer which can be > escaped midway through without losing the state accummulated up to > that point. A simple way to do this is to use a ReaderT monad stacked on top of IO,

IO StateTransformer with an escape clause

2003-08-27 Thread Thomas L. Bevan
Hi, I'd like some help building an IO StateTransformer which can be escaped midway through without losing the state accummulated up to that point. I tried constructing a StateT s MaybeIO a monad but the state is lost when the rest of the monad collapses. Tom __