<div dir="ltr">Thanks. I've opened a PR on GitHub to update the docs:<div><br></div><div><a href="https://github.com/ghc/ghc/pull/48">https://github.com/ghc/ghc/pull/48</a></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Jun 26, 2017 at 2:05 PM David Feuer <<a href="mailto:david.feuer@gmail.com">david.feuer@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">In the old days, DeriveDataTypeable enabled deriving both Data and<br>
Typeable. As of a fairly recent GHC version (7.10? 8.0?), Typeable<br>
instances are indeed derived automatically for all types that can get<br>
such instances, so DeriveDataTypeable is only used for deriving Data<br>
instances. I can't say whether it will ever be an error to write an<br>
explicit `deriving Typeable` clause, but I don't see much point in<br>
making it one.<br>
<br>
Unrelatedly, 8.2 has a complete overhaul of Typeable that you should<br>
take a look at if you're interested in the class. The new<br>
Type.Reflection API is much more powerful than the old Data.Typeable<br>
one.<br>
<br>
On Mon, Jun 26, 2017 at 1:17 PM, Chris Martin <<a href="mailto:ch.martin@gmail.com" target="_blank">ch.martin@gmail.com</a>> wrote:<br>
> Exhibit A:<br>
><br>
>> With -XDeriveDataTypeable, you can derive instances of the class Data,<br>
>> defined in Data.Data. See "Deriving Typeable instances" for deriving<br>
>> Typeable.<br>
><br>
> Exhibit B:<br>
><br>
>> -XDeriveDataTypeable<br>
>> Enable automatic deriving of instances for the Typeable typeclass<br>
><br>
> Exhibit C:<br>
><br>
>> Derived instances of Typeable are ignored, and may be reported as an error<br>
>> in a later version of the compiler.<br>
><br>
> ----------------<br>
><br>
> A and B seem contradictory: Is this extension for deriving Data, or for<br>
> deriving Typeable?<br>
><br>
> B and C seem... not technically contradictory, but why is there an extension<br>
> that enables the deriving of instances that will just be ignored?<br>
><br>
> Is this extension meant to be deprecated?<br>
><br>
> From experimentation, it seems like all types automatically get Typeable<br>
> instances whether you declare it or not. Is that accurate?<br>
><br>
> _______________________________________________<br>
> Glasgow-haskell-users mailing list<br>
> <a href="mailto:Glasgow-haskell-users@haskell.org" target="_blank">Glasgow-haskell-users@haskell.org</a><br>
> <a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users</a><br>
><br>
</blockquote></div>