• Ryan Scott's avatar
    Check for duplicate variables in associated default equations · 78a5c4ce
    Ryan Scott authored
    A follow-up to !696's, which attempted to clean up the error messages
    for ill formed associated type family default equations. The previous
    attempt, !696, forgot to account for the possibility of duplicate
    kind variable arguments, as in the following example:
    
    ```hs
    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 (hopefully for good this time).
    78a5c4ce
Code owners : Simon Peyton Jones
TcTyClsDecls.hs 169 KB