[GHC] #11732: Deriving Generic1 interacts poorly with TypeInType
GHC
ghc-devs at haskell.org
Tue Mar 29 18:09:16 UTC 2016
#11732: Deriving Generic1 interacts poorly with TypeInType
-------------------------------------+-------------------------------------
Reporter: goldfire | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
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):
Wiki Page: |
-------------------------------------+-------------------------------------
Changes (by RyanGlScott):
* related: => #5939
Comment:
OK, it sounds like we're converging on a consensus of being ultra-
permissive in allowing GHC to unify visible type parameters when deriving
instances.
With that in mind, here's what we still need to do to fix this ticket:
1. When generating a `Rep`/`Rep1` instance
[http://git.haskell.org/ghc.git/blob/eb6b7094c80fda5cc7c1d1ed3386486996f24bff:/compiler/typecheck/TcGenGenerics.hs#l482
here], do the appropriate type variable substitutions depending on the
types the user provides.
2. Remove the broken instantiation check
[http://git.haskell.org/ghc.git/blob/eb6b7094c80fda5cc7c1d1ed3386486996f24bff:/compiler/typecheck/TcGenGenerics.hs#l155
here].
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11732#comment:16>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list