summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorYuras Shumovich <shumovichy@gmail.com>2017-01-20 16:53:45 -0500
committerBen Gamari <ben@smart-cactus.org>2017-01-20 16:55:36 -0500
commit15b9a85ef03e2729d487a6f8460be8880c797609 (patch)
tree401bc0e8f102c03ff61e7d8d967eefe4accd5960 /utils
parentc43011da283bfcef664378bb451d5f3bffcdbe92 (diff)
downloadhaskell-15b9a85ef03e2729d487a6f8460be8880c797609.tar.gz
Warn on missing home modules
Introduce a warning, -Wmissing-home-modules, to warn about home modules, not listed in command line. It is usefull for cabal when user fails to list a module in `exposed-modules` and `other-modules`. Test Plan: make TEST=MissingMod Reviewers: mpickering, austin, bgamari Reviewed By: bgamari Subscribers: simonpj, mpickering, thomie Differential Revision: https://phabricator.haskell.org/D2977 GHC Trac Issues: #13129
Diffstat (limited to 'utils')
-rw-r--r--utils/mkUserGuidePart/Options/Warnings.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/utils/mkUserGuidePart/Options/Warnings.hs b/utils/mkUserGuidePart/Options/Warnings.hs
index f18222e130..f242fb062a 100644
--- a/utils/mkUserGuidePart/Options/Warnings.hs
+++ b/utils/mkUserGuidePart/Options/Warnings.hs
@@ -445,4 +445,13 @@ warningsOptions =
, flagType = DynamicFlag
, flagReverse = "-Wno-deriving-typeable"
}
+ , flag { flagName = "-Wmissing-home-modules"
+ , flagDescription =
+ "warn when encountering a home module imported, but not listed "++
+ "on the command line. Useful for cabal to ensure GHC won't pick "++
+ "up modules, not listed neither in ``exposed-modules``, nor in "++
+ "``other-modules``."
+ , flagType = DynamicFlag
+ , flagReverse = "-Wno-missing-home-modules"
+ }
]