ashley at semantic.org
Mon Jan 12 01:32:02 EST 2004
In article <ashley-5A25CF.22073709012004 at sea.gmane.org>,
> I don't believe you. My implementation uses Haskell's "mfix", which
> looks like a Y to me. I certainly don't use anything like "set!".
Actually, on looking at the code for my monad, it turns out I do.
I spent awhile trying to figure out how to make a monad that could lift
IO, and was also an instance of both MonadCont (so I could do
call-with-current-continuation) and MonadFix (so I could do letrec the
way I wanted it). I use CPS, and my implementation of mfix actually uses
newIORef, writeIORef and readIORef directly. But I'd forgotten...
Ashley Yakeley, Seattle WA
More information about the Haskell-Cafe