[GHC] #11450: Associated types at wrong type in instance

GHC ghc-devs at haskell.org
Tue Apr 5 14:13:27 UTC 2016


#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:  #11449, #11451    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------
Description changed by bgamari:

@@ -2,1 +2,1 @@
- {{{
+ {{{#!hs

New description:

 Consider
 {{{#!hs
 class C x where
   type T x

 instance C (Either a b) where
   type T (Either b a) = b -> a
 }}}
 This is bogus, because the equation for `T` has the parameters to `Either`
 reversed.  But GHC 8.0 RC1 (and master) allow it.

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11450#comment:21>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list