
#10637: Cannot suppress "Warning: {-# SOURCE #-} unnecessary in import of ‘A’" -----------------------------------------+--------------------------------- Reporter: phischu | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Keywords: | Operating System: Linux Architecture: x86_64 (amd64) | Type of failure: None/Unknown Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -----------------------------------------+--------------------------------- Consider the following three files: {{{#!hs -- A.hs module A where }}} {{{#!hs -- A.hs-boot module A where }}} {{{#!hs -- B.hs module B where import {-# SOURCE #-} A }}} When compiling these three files GHC emits a warning and rightly so: {{{
ghc B.hs
B.hs:3:23: Warning: {-# SOURCE #-} unnecessary in import of ‘A’ [1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot ) [2 of 3] Compiling A ( A.hs, A.o ) [3 of 3] Compiling B ( B.hs, B.o ) }}} When on the other hand compiling with `-w` I expect the warning to go away but it doesn't. {{{
ghc -w B.hs
B.hs:3:23: Warning: {-# SOURCE #-} unnecessary in import of ‘A’ [1 of 3] Compiling A[boot] ( A.hs-boot, A.o-boot ) [2 of 3] Compiling A ( A.hs, A.o ) [3 of 3] Compiling B ( B.hs, B.o ) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10637 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler