From 15b9a85ef03e2729d487a6f8460be8880c797609 Mon Sep 17 00:00:00 2001 From: Yuras Shumovich Date: Fri, 20 Jan 2017 16:53:45 -0500 Subject: 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 --- utils/mkUserGuidePart/Options/Warnings.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'utils') 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" + } ] -- cgit v1.2.1