#4983: Warning about redundant import is wrong when hiding identifiers in order 
to
avoid export ambiguities
------------------------------------------------+---------------------------
  Reporter:  Lemming                            |          Owner:               
   
      Type:  bug                                |         Status:  closed       
   
  Priority:  normal                             |      Milestone:               
   
 Component:  Compiler                           |        Version:  7.0.1        
   
Resolution:  wontfix                            |       Keywords:               
   
  Testcase:                                     |      Blockedby:               
   
Difficulty:                                     |             Os:  
Unknown/Multiple
  Blocking:                                     |   Architecture:  
Unknown/Multiple
   Failure:  Incorrect warning at compile-time  |  
------------------------------------------------+---------------------------

Comment(by Lemming):

 Replying to [comment:2 simonpj]:
 > I think Lemming's complaint is that the error message isn't right.  We
 don't want to import instances, but we still need `import Prelude ()`.  So
 the suggestion is right but the reason is wrong.

 Maybe this confused me and let me think that GHC is broken.
 My problem was, that I was not aware, that I did not use something from
 Prelude.
 Usually I use variables from Prelude without noting it.
 Maybe you can just alter the warning to:

 {{{
 src/Data/Monoid/HT.hs:6:1:
     Warning: You imported `Prelude', but used nothing of it,
                except perhaps instances from `Prelude'
              To import instances alone, use: import Prelude()
 }}}

 I remember that I have already seen such warnings from GHC (I mean: "used
 nothing of it"), but I do not know in what cases GHC emits them.

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

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to