diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/8.8.1-notes.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/using-warnings.rst | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/users_guide/8.8.1-notes.rst b/docs/users_guide/8.8.1-notes.rst index a781ec4181..972e4c0446 100644 --- a/docs/users_guide/8.8.1-notes.rst +++ b/docs/users_guide/8.8.1-notes.rst @@ -102,6 +102,8 @@ Compiler - The :ghc-flag:`-Wcompat` warning group now includes :ghc-flag:`-Wstar-is-type`. +- New :ghc-flag:`-Wunused-packages` warning reports unused packages. + - The :ghc-flag:`-fllvm-pass-vectors-in-regs` flag is now deprecated as vector arguments are now passed in registers by default. diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index ab61da936a..dda7bb656c 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -1683,6 +1683,21 @@ of ``-W(no-)*``. data Foo = Foo { f :: Int } | Bar +.. ghc-flag:: -Wunused-packages + :shortdesc: warn when package is requested on command line, but was never loaded. + :type: dynamic + :reverse: -Wno-unused-packages + :category: + + :since: 8.8 + + The option :ghc-flag:`-Wunused-packages` warns about packages, specified on + command line via :ghc-flag:`-package` or :ghc-flag:`-package-id`, but were not + loaded during compication. Usually it means that you have an unused dependency. + + You may want to enable this warning on a clean build or enable :ghc-flag:`-fforce-recomp` + in order to get reliable results. + If you're feeling really paranoid, the :ghc-flag:`-dcore-lint` option is a good choice. It turns on heavyweight intra-pass sanity-checking within GHC. (It checks GHC's sanity, not yours.) |