Re: [Haskell-cafe] How to implement instance of MonadBaseControl IO

2012-08-24 Thread Erik Hesselink
I'm not sure if you already have something working, but we have several in our codebase, all following a similar pattern. For example: newtype GeoServer a = GeoServer { unGeoServer :: ReaderT GeoServerState (ServerPartT IO) a } instance MonadBaseControl IO GeoServer where newtype StM GeoServer

Re: [Haskell-cafe] How to implement instance of MonadBaseControl IO

2012-08-24 Thread yi huang
On Sat, Aug 25, 2012 at 3:25 AM, Erik Hesselink hessel...@gmail.com wrote: I'm not sure if you already have something working, but we have several in our codebase, all following a similar pattern. For example: newtype GeoServer a = GeoServer { unGeoServer :: ReaderT GeoServerState

[Haskell-cafe] How to implement instance of MonadBaseControl IO

2012-08-22 Thread yi huang
I have a `newtype Yun a = Yun { unYun :: ReaderT YunEnv (ResourceT IO) a }` , and i need to define an instance of `MonadBaseControl IO` for it. Newtype instance deriving don't work here. I guess the answer is simple, i just can't figure it out, hope anybody can lightening me. Best regards.

Re: [Haskell-cafe] How to implement instance of MonadBaseControl IO

2012-08-22 Thread Chris Wong
On Wed, Aug 22, 2012 at 7:16 PM, yi huang yi.codepla...@gmail.com wrote: I have a `newtype Yun a = Yun { unYun :: ReaderT YunEnv (ResourceT IO) a }` , and i need to define an instance of `MonadBaseControl IO` for it. Newtype instance deriving don't work here. I guess the answer is simple, i