Exported pattern synonyms does not mark top-level bindings in RHS as used
{-# LANGUAGE PatternSynonyms #-}
module Foo (pattern P) where
x :: Int
x = 0
pattern P :: Int
pattern P <- _ where
P = x
gives:
Foo.hs:6:1: warning: [-Wunused-top-binds]
Defined but not used: ‘x’
Trac metadata
Trac field | Value |
---|---|
Version | 8.0.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Compiler |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |