[jhc] Monad.ST
Isaac Dupree
ml at isaac.cedarswampstudios.org
Mon Nov 16 01:05:23 EST 2009
Ah, I see you've put your machinations into StateT, in a way I admit I
don't entirely understand but sounds plausible to me... other than how
it looks to me that you end up wrapping all IO actions (like writeIORef)
inside an unsafeInterleaveIO, and there is no lossless way to reverse
that (no `seq`: might not be executed; `seq`: crashes on `return
undefined`) But I think I figured out my own question: StateT makes all
IO actions return a tuple type that's under its control.
:-)
other question is whether it works when you test it with things :-)
-Isaac
More information about the jhc
mailing list