Existence of complete pattern synonym hides unrelated incomplete pattern warning
This example
{-# LANGUAGE PatternSynonyms #-}
pattern Foo :: a -> b -> (a, b)
pattern Foo a b = (a, b)
{-# complete Foo #-}
main :: IO ()
main = case ((), Nothing :: Maybe Integer) of
((), Just x) -> print x
doesn't give a warning for the incomplete pattern match in main
, which doesn't involve textually the pattern synonym Foo
. Removing the complete pragma or changing the expression being matched on to even (,) () (Nothing :: Maybe Integer)
allows the warning
Trac metadata
Trac field | Value |
---|---|
Version | 8.4.3 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |