<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div>On Feb 2, 2009, at 1:06 AM, Louis Wasserman wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Is there any sensible way to make<br><br>newtype FooT m e = FooT (StateT Bar m e) deriving (MonadState)<br><br>work to give instance MonadState Bar (FooT m e)?<br><br>That is, I'm asking if there would be a semantically sensible way of modifying GeneralizedNewtypeDeriving to handle multi-parameter type classes when there is a functional dependency involved, assuming by default that the newtype is the more general of the types, perhaps?<br> <br clear="all">Louis Wasserman<br><a href="mailto:wasserman.louis@gmail.com">wasserman.louis@gmail.com</a><br> _______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>http://www.haskell.org/mailman/listinfo/haskell-cafe<br></blockquote></div><div><br></div>did you try this?<div><br><div>newtype FooT m e = FooT (StateT Bar m e) deriving (Monad, MonadState Bar)</div></div></body></html>