Opened 3 years ago

Closed 3 years ago

Last modified 2 years ago

#9707 closed task (wontfix)

(Try to) restructure `base` to allow more use of `AutoDeriveTypeable`

Reported by: hvr Owned by: ekmett
Priority: normal Milestone: 8.0.1
Component: Core Libraries Version:
Keywords: Typeable Cc: core-libraries-committee@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case:
Blocked By: Blocking:
Related Tickets: #9111 #9858 Differential Rev(s):
Wiki Page:

Description (last modified by hvr)

comment:ticket:9111:16 explains that import-cycles containing Data.Typeable.Internal (which provides the Typeable class AutoDeriveTypeable needs to be loaded for being able to operate) inside base make it difficult to use AutoDeriveTypeable, as well as making it more difficult to de-cycle the base import-dependency graph (see also attachment:typeable_deps.png)

This ticket is about trying to find a way to restructure base in order to allow to define the Typeable instances directly at the type's definition site (and thus allow the use of AutoDeriveTypeable)

Removing cycles in base is possibly required to make SplitBase easier

Attachments (1)

typeable_deps.png (201.9 KB) - added by hvr 3 years ago.

Download all attachments as: .zip

Change History (6)

Changed 3 years ago by hvr

Attachment: typeable_deps.png added

comment:1 Changed 3 years ago by hvr

Cc: core-libraries-committee@… added
Component: CompilerCore Libraries
difficulty: UnknownDifficult (2-5 days)
Keywords: Typeable added
Milestone: 7.12.1
Owner: set to ekmett
Version: 7.8.3

comment:2 Changed 3 years ago by hvr

Description: modified (diff)

comment:3 Changed 3 years ago by Herbert Valerio Riedel <hvr@…>

In 47b5b5c2b2c92ba091313c36489588edadceaa9d/ghc:

base: drop redundant Typeable derivings

Thanks to #9858 `Typeable` doesn't need to be explicitly derived anymore.
This also makes `AutoDeriveTypeable` redundant, as well as some imports of
`Typeable` (removal of whose may be beneficial to #9707). This commit
removes several such now redundant use-sites in `base`.

Reviewed By: austin, ekmett

Differential Revision: https://phabricator.haskell.org/D712

comment:4 Changed 3 years ago by hvr

Resolution: wontfix
Status: newclosed

this ticket has been rendered unecessary by #9858

comment:5 Changed 2 years ago by thoughtpolice

Milestone: 7.12.18.0.1

Milestone renamed

Note: See TracTickets for help on using tickets.