Ticket #5852 (closed feature request: fixed)
methods and associated types treated differently wrt. qualification
Description
Say I have the following module:
{-# LANGUAGE TypeFamilies #-}
module M where
class C a where
type T a :: *
m :: a
Now I use this module in another module via a qualified import:
{-# LANGUAGE TypeFamilies #-}
module U where
import qualified M
instance M.C Integer where
type M.T Integer = Integer
m = 0
Note that in the instance declaration, the associated type T is qualified, while the method m is not. Removing the qualification of T is not accepted by GHC, but neither is adding a qualification to m. I think this inconsistency is unfortunate, so that it might be good to remove it.
Change History
Note: See
TracTickets for help on using
tickets.
