Contradictions about DeriveDataTypeable in the manual?

Chris Martin ch.martin at gmail.com
Mon Jun 26 17:17:11 UTC 2017


Exhibit A:

> With -XDeriveDataTypeable, you can derive instances of the class Data,
defined in Data.Data. See "Deriving Typeable instances" for deriving
Typeable.

Exhibit B:

> -XDeriveDataTypeable
> Enable automatic deriving of instances for the Typeable typeclass

Exhibit C:

> Derived instances of Typeable are ignored, and may be reported as an
error in a later version of the compiler.

----------------

A and B seem contradictory: Is this extension for deriving Data, or for
deriving Typeable?

B and C seem... not technically contradictory, but why is there an
extension that enables the deriving of instances that will just be ignored?

Is this extension meant to be deprecated?

>From experimentation, it seems like all types automatically get Typeable
instances whether you declare it or not. Is that accurate?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/glasgow-haskell-users/attachments/20170626/685d3132/attachment.html>


More information about the Glasgow-haskell-users mailing list