COMPLETE pragma doesn't work with type families
Summary
COMPLETE pragma is ignored when used to annotate a type family instance.
Steps to reproduce
test.hs
:
{-# LANGUAGE TypeFamilies #-}
data family Foo
data instance Foo = A | B
{-# COMPLETE A :: Foo #-}
f :: Foo -> Int
f A = 0
Run with
ghci -Wincomplete-patterns test.hs
Expected behaviour
Should not warn about non-exhaustive patterns.
Environment
- GHC version used: 9.6.3