Skip to content

Check for duplicate variables in associated default equations

Ryan Scott requested to merge RyanGlScott/ghc:wip/T13971b into master

A follow-up to !696 (closed)'s, which attempted to clean up the error messages for ill formed associated type family default equations. The previous attempt, !696 (closed), forgot to account for the possibility of duplicate kind variable arguments, as in the following example:

class C (a :: j) where
  type T (a :: j) (b :: k)
  type T (a :: k) (b :: k) = k

This patch addresses this shortcoming by adding an additional check for this. Fixes #13971 (closed) (hopefully for good this time).

Merge request reports