Skip to content
Snippets Groups Projects
Commit 0b91a029 authored by Krzysztof Gogolewski's avatar Krzysztof Gogolewski Committed by Ben Gamari
Browse files

Handle hs-boot files in -Wmissing-home-modules (#16551)

(cherry picked from commit 43a43a33)
parent 605869c7
No related tags found
No related merge requests found
......@@ -184,6 +184,10 @@ warnMissingHomeModules hsc_env mod_graph =
is_my_target mod (TargetFile target_file _)
| Just mod_file <- ml_hs_file (ms_location mod)
= target_file == mod_file ||
-- Don't warn on B.hs-boot if B.hs is specified (#16551)
addBootSuffix target_file == mod_file ||
-- We can get a file target even if a module name was
-- originally specified in a command line because it can
-- be converted in guessTarget (by appending .hs/.lhs).
......
[1 of 3] Compiling B[boot] ( T16551/B.hs-boot, T16551/B.o-boot )
[2 of 3] Compiling A ( T16551/A.hs, T16551/A.o )
[3 of 3] Compiling B ( T16551/B.hs, T16551/B.o )
module A where
import {-# SOURCE #-} B
module B where
import A
module B where
......@@ -22,6 +22,7 @@ test('Werror01', normal, compile, [''])
test('Werror02', normal, compile, [''])
test('MissingMod', normal, multimod_compile, ['MissingMod', '-Wmissing-home-modules'])
test('T16551', [extra_files(['T16551/'])], multimod_compile, ['T16551/A.hs T16551/B.hs', '-Wmissing-home-modules'])
test('StarBinder', normal, compile, [''])
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment