Opened 3 years ago

Closed 18 months ago

Last modified 18 months ago

#12938 closed bug (fixed)

Polykinded associated type family rejected on false pretenses

Reported by: goldfire Owned by: goldfire
Priority: normal Milestone: 8.6.1
Component: Compiler Version: 8.0.1
Keywords: TypeInType Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: indexed-types/should_compile/T12938
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


If I say

class HasRep a where
  type Rep a :: TYPE r

I get

    • Kind variable ‘r’ is implicitly bound in datatype
      ‘Rep’, but does not appear as the kind of any
      of its type variables. Perhaps you meant
      to bind it (with TypeInType) explicitly somewhere?
      Type variables with inferred kinds: a
    • In the class declaration for ‘HasRep’

This definition should be accepted, though, as r is just an invisible parameter to the associated type family. (I don't know how useful this is, but it's not bogus.)

Change History (6)

comment:1 Changed 2 years ago by bgamari


Given that 8.2.1-rc1 is imminent, I'm bumping these off to the 8.4

comment:2 Changed 2 years ago by goldfire

This is fixed now. Adding a regression test.

comment:3 Changed 2 years ago by Ben Gamari <ben@…>

In b9776308/ghc:

Test #12938 in indexed-types/should_compile/T12938

comment:4 Changed 20 months ago by bgamari


This ticket won't be resolved in 8.4; remilestoning for 8.6. Do holler if you are affected by this or would otherwise like to work on it.

comment:5 Changed 18 months ago by RyanGlScott

Resolution: fixed
Status: newclosed

As noted in comment:2 and comment:3, this has been fixed, and a regression test has been added.

comment:6 Changed 18 months ago by RyanGlScott

Test Case: indexed-types/should_compile/T12938
Note: See TracTickets for help on using tickets.