Deprecate the `pattern` keyword in import and export lists
Summary
GHC Proposal #581, section 2.3, reads as follows:
Since the
data
specifier introduced above subsumes uses of thepattern
keyword in import/export lists that are permitted underPatternSynonyms
, we propose a new warning-Wpattern-namespace-specifier
that warns when the pattern namespace specifier is used. Initially this warning will be added to-Wcompat
.
This ticket tracks the implementation of this specific part of the proposal.
Steps to reproduce
ghci> :set -Wcompat -XPatternSynonyms
ghci> import Data.List.NonEmpty (pattern (:|))
Expected behavior
There should be a warning about the use of the pattern
keyword.
Environment
- GHC version used: 9.10.1