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

#10913: deprecate and then remove -fwarn-hi-shadowing -------------------------------------+------------------------------------- Reporter: osa1 | Owner: Type: task | Status: new Priority: lowest | Milestone: Component: Compiler | Version: 7.10.2 Keywords: newcomer | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Revisions: | -------------------------------------+------------------------------------- I realized that the flag is not used in the compiler at all, and @slyfox realized that the flag was last used in 2006. He also found out that there are 355 packages in the Hackage that use this useless flag. So we should maybe first deprecate it and remove it later. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10913 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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): -------------------------------------+------------------------------------- Changes (by ChrisU): * owner: => ChrisU Comment: The deprecate message will be a generic "does not work, will be taken out soon" message, because I don't know ''why'' it hasn't been used since 2006. (I.e. is the behavior subsumed, always done?, no longer implemented? Not implementable?) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10913#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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

#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): -------------------------------------+------------------------------------- Changes (by slyfox): * cc: slyfox (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10913#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 osa1): We should either implement or remove it, leaving it there unimplemented is the worst case, because it has an entry in user manual and man page etc. and users may expect it to work while it silently does nothing. Since nobody complained in 9 years, I say let's remove it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10913#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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): Wiki Page: | -------------------------------------+------------------------------------- Comment (by ChrisU): Should I deprecate it, or just remove it immediately? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10913#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC