[GHC] #9061: Warnings for redundant imports doesn't take name shadowing into account (Regression)

#9061: Warnings for redundant imports doesn't take name shadowing into account (Regression) -------------------------+------------------------------------------------- Reporter: | Owner: bergmark | Status: new Type: bug | Milestone: Priority: | Version: 7.8.2 normal | Operating System: Unknown/Multiple Component: | Type of failure: Incorrect warning at Compiler | compile-time Keywords: | Test Case: Architecture: | Blocking: Unknown/Multiple | Difficulty: | Unknown | Blocked By: | Related Tickets: | -------------------------+------------------------------------------------- Reproduction: {{{ module Log where import Prelude hiding (log) f :: () f = log where log = () }}} Compiling this with -Wall On GHC 7.8.2: {{{
ghc Log.hs -Wall [1 of 1] Compiling Log ( Log.hs, Log.o )
Log.hs:3:1: Warning: The import of ‘Prelude’ is redundant except perhaps to import instances from ‘Prelude’ To import instances alone, use: import Prelude() }}} The suggestion is incorrect since removing the import statement gives the following warning: {{{ Log.hs:4:15: Warning: This binding for ‘log’ shadows the existing binding imported from ‘Prelude’ at Log.hs:1:8-10 (and originally defined in ‘GHC.Float’) }}} On GHC 7.6.3 the Reproduction does not give any warnings (which is correct). -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9061 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9061: Warnings for redundant imports doesn't take name shadowing into account (Regression) -------------------------------------------------+------------------------- Reporter: bergmark | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Comment (by simonpj): Ah yes, thank you. Patch coming. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9061#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9061: Warnings for redundant imports doesn't take name shadowing into account
(Regression)
-------------------------------------------------+-------------------------
Reporter: bergmark | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect warning at | Unknown/Multiple
compile-time | Difficulty:
Test Case: | Unknown
Blocking: | Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by Simon Peyton Jones

#9061: Warnings for redundant imports doesn't take name shadowing into account
(Regression)
-------------------------------------------------+-------------------------
Reporter: bergmark | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect warning at | Unknown/Multiple
compile-time | Difficulty:
Test Case: | Unknown
Blocking: | Blocked By:
| Related Tickets:
-------------------------------------------------+-------------------------
Comment (by Simon Peyton Jones

#9061: Warnings for redundant imports doesn't take name shadowing into account (Regression) -------------------------------------------------+------------------------- Reporter: bergmark | Owner: Type: bug | Status: merge Priority: normal | Milestone: Component: Compiler | Version: 7.8.2 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Type of failure: Incorrect warning at | Unknown/Multiple compile-time | Difficulty: Test Case: module/T9061 | Unknown Blocking: | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by simonpj): * status: new => merge * testcase: => module/T9061 Comment: Just about worth merging to 7.8, but hardly a big deal. Simon -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9061#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9061: Warnings for redundant imports doesn't take name shadowing into account (Regression) -------------------------------------------------+------------------------- Reporter: bergmark | Owner: Type: bug | Status: Priority: normal | closed Component: Compiler | Milestone: 7.8.3 Resolution: fixed | Version: 7.8.2 Operating System: Unknown/Multiple | Keywords: Type of failure: Incorrect warning at | Architecture: compile-time | Unknown/Multiple Test Case: module/T9061 | Difficulty: Blocking: | Unknown | Blocked By: | Related Tickets: -------------------------------------------------+------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9061#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC