diff options
author | Yuras Shumovich <shumovichy@gmail.com> | 2019-01-20 19:49:56 -0500 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2019-06-07 18:46:29 -0400 |
commit | fdbf429d575a581e38fdf9e72a4f0e0928f36f57 (patch) | |
tree | a808b8473b6cdc6ddb09e0d9362f4aed0c4829e1 /docs/users_guide | |
parent | 1afb499583f741a95cceb3207c5455c8ec6f5b87 (diff) | |
download | haskell-wip/D5285.tar.gz |
Warn about unused packageswip/D5285
Reviewers: bgamari, simonpj
Reviewed By: simonpj
Subscribers: hvr, simonpj, mpickering, rwbarton, carter
GHC Trac Issues: #15838
Differential Revision: https://phabricator.haskell.org/D5285
Diffstat (limited to 'docs/users_guide')
-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.) |