Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
Documentation
ignoreWildcardsUnderCompleteTypeSignatures :: Declaration -> Declaration Source #
Replaces `TypeWildcard _ UnnamedWildcard` with `TypeWildcard _ IgnoredWildcard` in places where we don't want to emit a warning about wildcards.
The guiding principle here is that a wildcard can be ignored if there is a complete (wildcard-free) type signature on a binding somewhere between the type in which the wildcard occurs and the top level of the module. In particular, this means that top-level signatures containing wildcards are always warnings, and a top-level signature always prevents wildcards on inner bindings from emitting warnings.