On Thu, Apr 10, 2008 at 12:44 PM, Antoine Latter <[EMAIL PROTECTED]> wrote:
>  {-# LANGUAGE GeneralizedNewtypeDeriving #-}
>
>  import Control.Monad.Trans
>  import Control.Monad.State
>  import Control.Monad.Error
>
>  type BrowserAction = IO  -- or something else which is in MondaIO
>  data RBState = RBState
>
>
>  newtype RBAction a = RBAction
>    { exec :: ErrorT String (StateT RBState BrowserAction) a }
>    deriving (Functor, Monad, MonadState RBState, MonadIO)

D'oh!  Deriving MonadIO for the newtype should work, so long as
BrowserAction is in the MonadIO class.

-Antoine
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to