[GHC] #11450: Associated types at wrong type in instance
GHC
ghc-devs at haskell.org
Thu Jan 21 15:34:46 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: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Iceland_jack):
Should this be rejected?
{{{#!hs
class C x y where
type T x y
instance C (Either a b) (Maybe c) where
type T (Either a b) (Maybe b) = a
}}}
GHC 8.1.20160117 gives:
{{{
• Type indexes must match class instance head
Found ‘Either a b’ but expected ‘Either a b’
• In the type instance declaration for ‘T’
In the instance declaration for ‘C (Either a b) (Maybe c)’
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/11450#comment:9>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list