[GHC] #11732: Deriving Generic1 interacts poorly with TypeInType
GHC
ghc-devs at haskell.org
Sun Apr 10 21:39:31 UTC 2016
#11732: Deriving Generic1 interacts poorly with TypeInType
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: merge
Priority: normal | Milestone: 8.0.1
Component: Compiler | Version: 8.1
Resolution: | Keywords: TypeInType,
| Generics
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: #5939 | Differential Rev(s): Phab:D2061
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"7443e5c8dae24b83f5f4975c7accce02b819029c/ghc"
7443e5c8/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="7443e5c8dae24b83f5f4975c7accce02b819029c"
Remove the instantiation check when deriving Generic(1)
Previously, deriving `Generic(1)` bailed out when attempting to
instantiate visible type parameters (#5939), but this instantiation
check was quite fragile and doesn't interact well with `-XTypeInType`.
It has been decided that `Generic(1)` shouldn't be subjected to this
check anyway, so it has been removed, and `gen_Generic_binds`'s
machinery has been updated to substitute the type variables in a
generated `Rep`/`Rep1` instance with the user-supplied type arguments.
In addition, this also refactors `Condition` in `TcDeriv` a bit. Namely,
since we no longer need `tc_args` to check any conditions, the `[Type]`
component of `Condition` has been removed.
Fixes #11732.
Test Plan: ./validate
Reviewers: goldfire, kosmikus, simonpj, bgamari, austin
Reviewed By: simonpj, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2061
GHC Trac Issues: #5939, #11732
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11732#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list