Skip to content
  • Ryan Scott's avatar
    Split off -Wunused-type-variables from -Wunused-matches · 6817703b
    Ryan Scott authored
    Summary:
    Previously, `-Wunused-matches` would fire whenever it detected unused type
    variables in a type family or data family instance. This can be annoying for
    users who wish to use type variable names as documentation, as being
    `-Wall`-compliant would mean that they'd have to prefix many of their type
    variable names with underscores, making the documentation harder to read.
    
    To avoid this, a new warning `-Wunused-type-variables` was created that only
    encompasses unused variables in family instances. `-Wunused-matches` reverts
    back to its role of only warning on unused term-level pattern names. Unlike
    `-Wunused-matches`, `-Wunused-type-variables` is not implied by `-Wall`.
    
    Fixes #11451.
    
    Test Plan: ./validate
    
    Reviewers: goldfire, ekmett, austin, hvr, simonpj, bgamari
    
    Reviewed By: simonpj, bgamari
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D1825
    
    GHC Trac Issues: #11451
    6817703b