
2 Jul
2010
2 Jul
'10
9:27 p.m.
On Fri, Jul 2, 2010 at 4:59 PM, Nils Schweinsberg
And here wo go. MState on hackage:
http://hackage.haskell.org/package/mstate
My first hackage library. :)
Awesome. I needed something like that once, too, down to the same type signature for the fork function. Here's an instance from my code: instance MonadFork (ReaderT s IO) where fork newT = ask >>= liftIO . forkIO . runReaderT newT since you seem to be using mtl, feel free to integrate it in some form if you like, small though it is. ReaderT over concurrent primitives is nice because forking is just that easy. I just used MVars for my state monad; yours is better (more sophisticated). Cheers, Matt