Ticket #5481 (closed bug: fixed)
Associated type defaults + MultiParamTypeClasses error
Description
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.
Change History
Note: See
TracTickets for help on using
tickets.
