[GHC] #8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported

#8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported ------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- Sorry, I have another corner case for a redundant import warning: {{{ module Main where import Control.Monad.Trans.Writer (WriterT, runWriterT) main :: IO () main = undefined runWriterT }}} This module will not provoke a warning, although the import of WriterT can be omitted. I assume this is because runWriterT is a record selector of WriterT and could (or should?) be imported as: {{{ import Control.Monad.Trans.Writer (WriterT(runWriterT)) }}} Since I used runWriterT like a regular function I did not care about its record selector feature. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8149 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported -------------------------------------+------------------------------------ Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by adamgundry): * cc: adam.gundry@… (added) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8149#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Comment (by thomie): This was fixed in or before 7.8.3. A regression test should probably be added. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8149#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8149: GHC should warn about redundant import of a type name also if one of its
record selectors is imported
-------------------------------------+-------------------------------------
Reporter: Lemming | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
Resolution: | Keywords:
Operating System: | Architecture: Unknown/Multiple
Unknown/Multiple | Difficulty: Unknown
Type of failure: | Blocked By:
None/Unknown | Related Tickets:
Test Case: |
Blocking: |
Differential Revisions: |
-------------------------------------+-------------------------------------
Comment (by Simon Peyton Jones

#8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => fixed Comment: Indeed, thanks -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8149#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8149: GHC should warn about redundant import of a type name also if one of its record selectors is imported -------------------------------------+------------------------------------- Reporter: Lemming | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: | Architecture: Unknown/Multiple Unknown/Multiple | Difficulty: Unknown Type of failure: | Blocked By: None/Unknown | Related Tickets: Test Case: | rename/should_fail/T8149 | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by simonpj): * testcase: => rename/should_fail/T8149 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8149#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC