purescript-0.15.15: PureScript Programming Language Compiler

Safe Haskell | None
Language | Haskell2010

Language.PureScript.Linter.Wildcards

Synopsis

- ignoreWildcardsUnderCompleteTypeSignatures :: Declaration -> Declaration

# Documentation

ignoreWildcardsUnderCompleteTypeSignatures :: Declaration -> Declaration #

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.