#5481: Associated type defaults + MultiParamTypeClasses error
---------------------------------+------------------------------------------
Reporter: illissius | Owner:
Type: bug | Status: new
Priority: normal | Component: Compiler
Version: 7.3 | Keywords:
Testcase: | Blockedby:
Os: Unknown/Multiple | Blocking:
Architecture: Unknown/Multiple | Failure: GHC rejects valid program
---------------------------------+------------------------------------------
If I try this with GHC HEAD as of yesterday:
{{{
{-# LANGUAGE TypeFamilies, MultiParamTypeClasses #-}
class Foo a b where
type X a
type X a = b
type Y b
type Y b = a
}}}
I get this error:
{{{
test2.hs:7:5:
Type indexes must match class instance head
Found `b' but expected `a'
In the type synonym instance declaration for `Y'
In the class declaration for `Foo'
}}}
Notably, it doesn't complain about {{{type X a = b}}}, only {{{type Y b =
a}}}. Unless I'm doing something dumb, it should probably work both ways.
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5481>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs