Opened 9 days ago

#15711 new bug

Kind inference of class variables does not examine associated types

Reported by: goldfire Owned by:
Priority: normal Milestone:
Component: Compiler Version: 8.6.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:


If I say this

{-# LANGUAGE TypeFamilies, PolyKinds, DataKinds #-}

module Bug where

class C a where
  type F (x :: Maybe a)

then GHCi says this

*Bug> :k C
C :: k -> Constraint

That's silly. C should have kind Type -> Constraint, because the usage of a in the kind of the associated type constraints a's kind.

Will fix.

Change History (0)

Note: See TracTickets for help on using tickets.