<div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">I have a type family and a type class:<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
type family ErrorAlg (f :: (* -&gt; *) -&gt; * -&gt; *) e ix :: *<br>
</blockquote>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
class MkErrorAlg f where<br>
  mkErrorAlg :: ErrorAlg f e a -&gt; f (K0 a) ix -&gt; Either e a<br>
</blockquote>
<br>
Instances for these two really go hand in hand, so I thought I would move the type family into the type class. </blockquote></div><br>Perhaps this isn&#39;t answering your question, but you can turn the above into an associated type as follows.<br>
<br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">class MkErrorAlg f where<br>  type ErrorAlg (f :: (* -&gt; *) -&gt; * -&gt; *) :: * -&gt; * -&gt; *<br>
  mkErrorAlg :: ErrorAlg f e a -&gt; f (K0 a) ix -&gt; Either e a<br></blockquote><br>Regards,<br>Sean<br>