Opened 2 years ago

Closed 7 months ago

Last modified 7 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:

Description

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 20 months ago by bgamari

Milestone: 8.2.18.4.1

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

comment:2 Changed 15 months ago by goldfire

This is fixed now. Adding a regression test.

comment:3 Changed 14 months ago by Ben Gamari <ben@…>

In b9776308/ghc:

Test #12938 in indexed-types/should_compile/T12938

comment:4 Changed 10 months ago by bgamari

Milestone: 8.4.18.6.1

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 7 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 7 months ago by RyanGlScott

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