diff options
-rw-r--r-- | compiler/typecheck/TcHsSyn.hs | 2 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/T11077.hs | 3 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/T11077.stderr | 3 | ||||
-rw-r--r-- | testsuite/tests/warnings/should_compile/all.T | 1 |
4 files changed, 8 insertions, 1 deletions
diff --git a/compiler/typecheck/TcHsSyn.hs b/compiler/typecheck/TcHsSyn.hs index ae095e0da3..39e7f2d5da 100644 --- a/compiler/typecheck/TcHsSyn.hs +++ b/compiler/typecheck/TcHsSyn.hs @@ -317,7 +317,7 @@ zonkTopDecls ev_binds binds export_ies sig_ns rules vects imp_specs fords ; warn_missing_sigs <- woptM Opt_WarnMissingSigs ; warn_only_exported <- woptM Opt_WarnMissingExportedSigs ; let export_occs = maybe emptyBag - (listToBag . map (rdrNameOcc . ieName . unLoc) . unLoc) + (listToBag . concatMap (map rdrNameOcc . ieNames . unLoc) . unLoc) export_ies sig_warn | warn_only_exported = topSigWarnIfExported export_occs sig_ns diff --git a/testsuite/tests/warnings/should_compile/T11077.hs b/testsuite/tests/warnings/should_compile/T11077.hs new file mode 100644 index 0000000000..76533cb950 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T11077.hs @@ -0,0 +1,3 @@ +module T11077 (module X, foo) where +import Data.List as X +foo = undefined diff --git a/testsuite/tests/warnings/should_compile/T11077.stderr b/testsuite/tests/warnings/should_compile/T11077.stderr new file mode 100644 index 0000000000..3cb2cba2d0 --- /dev/null +++ b/testsuite/tests/warnings/should_compile/T11077.stderr @@ -0,0 +1,3 @@ + +T11077.hs:3:1: warning: + Top-level binding with no type signature: foo :: forall t. t diff --git a/testsuite/tests/warnings/should_compile/all.T b/testsuite/tests/warnings/should_compile/all.T index 3954ba82e0..c2b8dd2274 100644 --- a/testsuite/tests/warnings/should_compile/all.T +++ b/testsuite/tests/warnings/should_compile/all.T @@ -4,6 +4,7 @@ test('T9178', extra_clean(['T9178.o', 'T9178DataType.o', 'T9178.hi', 'T9178DataType.hi']), multimod_compile, ['T9178', '-Wall']) test('T9230', normal, compile_without_flag('-fno-warn-tabs'), ['']) +test('T11077', normal, compile, ['-fwarn-missing-exported-sigs']) test('T11128', normal, compile, ['']) test('DeprU', |