Ah, no. But that would be easy to add to the <a href="http://hackage.haskell.org/packages/archive/base/4.6.0.0/doc/html/GHC-Generics.html#g:3">Datatype class</a>, I think. Perhaps<br>open a feature request?<br><br><br>Cheers,<br>

Pedro<br><br><div class="gmail_quote">On Sun, Jan 27, 2013 at 8:34 PM, Roman Cheplyaka <span dir="ltr">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Sorry, I wasn&#39;t clear. What I want is somehow to find out whether the<br>
type under consideration is declared using data or newtype.<br>
<br>
Is it possible?<br>
<br>
Roman<br>
<br>
* José Pedro Magalhães &lt;<a href="mailto:jpm@cs.uu.nl">jpm@cs.uu.nl</a>&gt; [2013-01-27 20:29:52+0000]<br>
<div class="HOEnZb"><div class="h5">&gt; Hi Roman,<br>
&gt;<br>
&gt; Yes, the automatic derivation of Generic instances does not see through<br>
&gt; newtypes.<br>
&gt;<br>
&gt;<br>
&gt; Cheers,<br>
&gt; Pedro<br>
&gt;<br>
&gt; On Sun, Jan 27, 2013 at 8:17 PM, Roman Cheplyaka &lt;<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>&gt; wrote:<br>
&gt;<br>
&gt; &gt; Hi,<br>
&gt; &gt;<br>
&gt; &gt; Is it possible to generate different instances for newtypes and<br>
&gt; &gt; datatypes using GHC.Generics?<br>
&gt; &gt;<br>
&gt; &gt; Roman<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Haskell-Cafe mailing list<br>
&gt; &gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
&gt; &gt;<br>
</div></div></blockquote></div><br>