<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Type families and functional dependencies play very poorly together. The internal GHC mechanisms to implement them are basically entirely separate, so I'm not surprised that this fails. I do think that what you want is type-safe, but just not supported right now.</div><div><br></div><div>Richard</div><div><br></div><div><div>On Oct 1, 2014, at 6:14 PM, Brandon Moore <<a href="mailto:brandon_m_moore@yahoo.com">brandon_m_moore@yahoo.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><div style="background-color: rgb(255, 255, 255); font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 16px; "><div id="yui_3_16_0_1_1412201384702_25685" style="" class="">I was trying to make a bridge like this</div><div id="yui_3_16_0_1_1412201384702_25656" style="" class=""><br style="" class=""></div><div id="yui_3_16_0_1_1412201384702_25683" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">class MonadStateTF m where</div><div id="yui_3_16_0_1_1412201384702_25660" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">   type StateOf m :: *</div><div id="yui_3_16_0_1_1412201384702_25662" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">instance (MonadState s m) =>
 MonadStateTF m where</div><div id="yui_3_16_0_1_1412201384702_25664" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">  type StateOF m = s<br style="" class=""></div><div id="yui_3_16_0_1_1412201384702_25681" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; "><br style="" class=""></div><div id="yui_3_16_0_1_1412201384702_25666" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">to allow writing constraints on state monads without a dangling type parameter<br style="" class=""></div><div id="yui_3_16_0_1_1412201384702_25668" class="" style="font-size: 16px; font-family: HelveticaNeue, 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: transparent; font-style: normal; ">type NumMonad m = (MonadStateTF m, Num (StateOf m))<br style="" class=""></div><br style="" class="">Unfortunately, the declaration type StateOF m = s<br style="" class="">complains that "s" isn't mentioned on the left hand side rather<br style="" class="">than somehow making use of the fundep.<br style="" class=""><br style="" class="">Brandon<div></div></div></div>_______________________________________________<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><br></body></html>