Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 5,239
    • Issues 5,239
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 566
    • Merge requests 566
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #11000
Closed
Open
Issue created Oct 22, 2015 by Herbert Valerio Riedel@hvr🕺Maintainer

Implement `-Wcompat`

Currently we have only the following generic warning "levels":

   -W     enable normal warnings
   -w     disable all warnings
   -Wall  enable almost all warnings (details in )

It would be useful to be able to refer collectively to all currently implemented forward-compatibility warnings (e.g. about upcoming changes in base, like -fwarn-amp) via a symbolic -Wcompat flag.

This way, users have more flexibility in opt-in or out of such warnings. So e.g. the following settings are possible in .cabal files:

ghc-options: -Wall :: enable "almost all warnings" as before. Some compatibility warnings may be part of -Wall, some won't (yet). ghc-options: -Wall -Wcompat :: enable "almost all warnings" as well as all currently implemented warnings. E.g. if GHC 8.0 implements -fwarn-mfp-compat but doesn't include it in -Wall, this gives users a way to opt in to get notified early about upcoming changes. ghc-options: -Wall -Wno-compat :: This enables -Wall **minus** any future-compat warnings. This is for users who want to be warned at all about any future compat warnings. ghc-options: -Wcompat :: Of course, -W(no-)compat can be used also w/o -Wall, and then is equivalent to turning on/off the respective individual -fwarn-*-compat flags. ghc-options: -Wall -Wcompat -Wno-mfp-compat :: This would allow to acknowledge the MFP compat warnings, while enabling other future GHC compat warnings.

Edited Mar 10, 2019 by Herbert Valerio Riedel
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking