Skip to content

Associated type is accepted even without mentioning class parameters

The following module is accepted:

{-# LANGUAGE TypeFamilies #-}

module Bug where

class C a where
  type F b

Note that the associate type family F does not mention the class variable a. Because associated type families are somewhat thin sugar over non-associated type families, I doubt this causes any great disaster anywhere, but it should probably be fixed.

Trac metadata
Trac field Value
Version 7.8.2
Type Bug
TypeOfFailure OtherFailure
Priority low
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information