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"><<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Sorry, I wasn'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 <<a href="mailto:jpm@cs.uu.nl">jpm@cs.uu.nl</a>> [2013-01-27 20:29:52+0000]<br>
<div class="HOEnZb"><div class="h5">> Hi Roman,<br>
><br>
> Yes, the automatic derivation of Generic instances does not see through<br>
> newtypes.<br>
><br>
><br>
> Cheers,<br>
> Pedro<br>
><br>
> On Sun, Jan 27, 2013 at 8:17 PM, Roman Cheplyaka <<a href="mailto:roma@ro-che.info">roma@ro-che.info</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > Is it possible to generate different instances for newtypes and<br>
> > datatypes using GHC.Generics?<br>
> ><br>
> > Roman<br>
> ><br>
> > _______________________________________________<br>
> > Haskell-Cafe mailing list<br>
> > <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
> > <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
> ><br>
</div></div></blockquote></div><br>