Hi,<br><br>[Moving to <a href="mailto:glasgow-haskell-users@haskell.org">glasgow-haskell-users@haskell.org</a>]<br><br>I would also like to know the answer to this question. While I can imagine it has something to do with type checking/inference, it is not immediately clear to me where the problem lies.<br>

<br><br>Thanks,<br>Pedro<br><br><div class="gmail_quote">On Sat, Feb 5, 2011 at 12:25, Steven Keuchel <span dir="ltr">&lt;<a href="mailto:steven.keuchel@gmail.com">steven.keuchel@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

Hi list,<br>
<br>
I was wondering why GHC doesn&#39;t allow usage of polymorphic types in<br>
the right-hand side of type instance declarations for type families.<br>
The GHC user guide states: &quot;The right-hand side of a type instance<br>
must be a monotype (i.e., it may not include foralls) [...]&quot;, but it<br>
doesn&#39;t state the reason.<br>
<br>
I stumbled upon this limitation when I was trying to generically<br>
calculate Johann&#39;s and Ghani&#39;s interpreter (transformers) for nested<br>
data types from their &quot;Initial Algebra Semantics is Enough!&quot; paper.<br>
<br>
Cheers,<br>
Steven<br>
<br>
_______________________________________________<br>
Haskell mailing list<br>
<a href="mailto:Haskell@haskell.org">Haskell@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell</a><br>
</blockquote></div><br>