Why this function doesn't compile?<br><br>phi :: Monad m => StateT s m ()<br>phi = lift $ return () <br><br>I get (ghc-7.4.1)<br><br> Could not deduce (MonadTrans (StateT s))<br> arising from a use of `lift'<br>
from the context (Monad m)<br> bound by the type signature for phi :: Monad m => StateT s m ()<br> at FSMt.hs:28:1-22<br> Possible fix:<br> add (MonadTrans (StateT s)) to the context of<br> the type signature for phi :: Monad m => StateT s m ()<br>
or add an instance declaration for (MonadTrans (StateT s))<br> In the expression: lift<br> In the expression: lift $ return ()<br> In an equation for `phi': phi = lift $ return ()<br>Failed, modules loaded: none.<br>
<br><br>Anton<br><br>