summaryrefslogtreecommitdiff
path: root/docs/users_guide/using-warnings.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/users_guide/using-warnings.rst')
-rw-r--r--docs/users_guide/using-warnings.rst14
1 files changed, 9 insertions, 5 deletions
diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst
index 5b0093b650..cad98bb4da 100644
--- a/docs/users_guide/using-warnings.rst
+++ b/docs/users_guide/using-warnings.rst
@@ -2083,7 +2083,7 @@ 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.
+ :shortdesc: warn when package is requested on command line, but not needed.
:type: dynamic
:reverse: -Wno-unused-packages
:category:
@@ -2092,11 +2092,15 @@ of ``-W(no-)*``.
The option :ghc-flag:`-Wunused-packages` warns about packages, specified on
command line via :ghc-flag:`-package ⟨pkg⟩` or
- :ghc-flag:`-package-id ⟨unit-id⟩`, but were not loaded during compilation.
- Usually it means that you have an unused dependency.
+ :ghc-flag:`-package-id ⟨unit-id⟩`, but were not needed during compilation.
+ If the warning fires it means the specified package wasn't needed for
+ compilation.
+
+ This warning interacts poorly with GHCi because most invocations will pass
+ a large number of ``-package`` arguments on the initial load. Therefore if
+ you modify the targets using ``:load`` or ``:cd`` then the warning will be
+ silently disabled if it's enabled (see :ghc-ticket:`21110`).
- You may want to enable this warning on a clean build or enable :ghc-flag:`-fforce-recomp`
- in order to get reliable results.
.. ghc-flag:: -Winvalid-haddock
:shortdesc: warn when a Haddock comment occurs in an invalid position