Opened 15 months ago

Last modified 5 weeks ago

#12938 new bug

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:
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 (4)

comment:1 Changed 11 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 6 months ago by goldfire

This is fixed now. Adding a regression test.

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

In b9776308/ghc:

Test #12938 in indexed-types/should_compile/T12938

comment:4 Changed 5 weeks 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.

Note: See TracTickets for help on using tickets.