[GHC] #10913: deprecate and then remove -fwarn-hi-shadowing

GHC ghc-devs at haskell.org
Mon Sep 28 20:42:30 UTC 2015


#10913: deprecate and then remove -fwarn-hi-shadowing
-------------------------------------+-------------------------------------
        Reporter:  osa1              |                Owner:  ChrisU
            Type:  task              |               Status:  new
        Priority:  lowest            |            Milestone:
       Component:  Compiler          |              Version:  7.10.2
      Resolution:                    |             Keywords:  newcomer
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
-------------------------------------+-------------------------------------

Comment (by ChrisU):

 This maybe shouldn't be deprecated as we can actually get a situation
 where such a warning would be useful.  Its a bit pathological in nature,
 which might be why this has been left nonworking for 15 years.


 {{{
 ~/test$ ghc --make Test -ia -ib -fforce-recomp -fwarn-hi-shadowing
 [1 of 2] Compiling B                ( a/B.hs, a/B.o )
 [2 of 2] Compiling Main             ( Test.hs, Test.o )
 Linking Test ...
 ~/test$ find .
 .
 ./b
 ./b/B.hi
 ./b/B.hs
 ./b/B.o
 ./Test.hi
 ./Test.hs
 ./Test
 ./Test.o
 ./a
 ./a/B.hi
 ./a/B.hs
 ./a/B.o
 ~/test$ ./Test
 a
 ~/test$ cat b/B.hs
 module B where
   main' = putStrLn "b"
 ~/test$ cat a/B.hs
 module B where
   main' = putStrLn "a"
 }}}

 A warning that b/B.hi is getting ignored would be useful.
 On the other hand if this turned up too often, we would have gotten
 complaints/requests over the last 15 years.

 (It was removed between 4.02 and 5.0, presumably because hierarchical
 modules made shadowed .hi files much rarer and harder to test for.)

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10913#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list