
#11450: Associated types at wrong type in instance -------------------------------------+------------------------------------- Reporter: simonpj | Owner: Type: bug | Status: new Priority: high | Milestone: 8.0.1 Component: Compiler | Version: 7.10.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by rwbarton): Replying to [comment:11 RyanGlScott]:
[...]
Then we'd have to do something like this:
{{{#!hs instance Warning (Either a b) where type T (Either a b) = a }}}
But this results in a warning on GHC 8.0!
{{{ Defined but not used: type variable ‘b’ }}}
And if you changed `b` to `_`, it would no longer follow the rules described above.
GHC 8.0 does warn about that but it shouldn't. See #11451. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11450#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler