16 Sep
2009
16 Sep
'09
6:51 p.m.
newtype VMT m a = VMT {runVMT :: StateT VMState m a} deriving (Monad, MonadIO, MonadTrans, TransM, MonadState VMState) works here (ghc-6.10.3) On Wed, Sep 16, 2009 at 11:42 AM, Miguel Mitrofanov <miguelimo38@yandex.ru> wrote:
newtype VMT m a = VMT {runVMT :: StateT VMState m a} deriving (Monad, MonadIO, MonadTrans, TransM)
Unfortunately, you can't automatically derive MonadState, since it's a multi-paremeter type class. You'll have to write down the derivation yourself.