[GHC] #9858: Typeable instances should be kind-aware
GHC
ghc-devs at haskell.org
Sun Mar 8 16:23:04 UTC 2015
#9858: Typeable instances should be kind-aware
-------------------------------------+-------------------------------------
Reporter: dreixel | Owner:
Type: bug | Status: new
Priority: highest | Milestone: 7.10.1
Component: Compiler | Version: 7.9
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: None/Unknown | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by rwbarton):
* owner: dreixel =>
* status: merge => new
Comment:
(Reopening for discussion)
Sorry for getting here a bit late; but I have some concerns about this
change as it stands currently.
Abstractly my main concern is that we've made a change (implicitly
deriving Typeable everywhere) for the wrong reasons, and concretely my
main fear, given the timing of this change, is that we'll find the new
approach is untenable for some reason or other and be forced back into a
world in which explicit deriving Typeable is required.
I'm certainly not trying to say that implicitly deriving Typeable is the
wrong decision; but it seems that it arose as fallout from the issue in
this ticket and #10000 for technical reasons, and not because we decided
that we really want it. We will always be able to transition to implicit
deriving Typeable in the future, but transitioning back to explicit
deriving Typeable loses compatibility with programs written for an earlier
version of the compiler that had implicit deriving Typeable.
So, seeing as we are in the RC phase for 7.10, my recommendation would be:
- Keep the requirement to explicitly derive Typeable (and keep
AutoDeriveTypeable, etc.) as in 7.10 RC 2
- Don't actually generate evidence terms when deriving Typeable. Instead
mark the type as "Typeable-allowed".
- When generating evidence in the Typeable solver, check that all of the
types involved are marked as "Typeable-allowed".
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9858#comment:64>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list