#6007: ghci: Importing specific non-existent names from a module breaks later
imports
---------------------------------+------------------------------------------
    Reporter:  josh              |       Owner:  simonmar        
        Type:  bug               |      Status:  new             
    Priority:  normal            |   Milestone:  7.6.1           
   Component:  GHCi              |     Version:  7.4.1           
    Keywords:                    |          Os:  Unknown/Multiple
Architecture:  Unknown/Multiple  |     Failure:  None/Unknown    
  Difficulty:  Unknown           |    Testcase:                  
   Blockedby:                    |    Blocking:                  
     Related:                    |  
---------------------------------+------------------------------------------
Changes (by simonmar):

  * owner:  => simonmar
  * difficulty:  => Unknown
  * component:  Compiler => GHCi
  * milestone:  => 7.6.1


Comment:

 Yes, this is a bit unfortunate.  You can see what happens with `:show
 imports`:

 {{{
 Prelude> import System.IO(foo)

 <interactive>:1:18: Module `System.IO' does not export `foo'
 Prelude> :show imports
 import Prelude -- implicit
 import System.IO ( foo )
 Prelude>
 }}}

 The import is remembered by GHCi and replayed every time the set of
 imports changes.  We do catch obvious problems such as when the module
 does not exist, but not deeper errors like this.

 You can recover with `:module -System.IO`:

 {{{
 Prelude> :module -System.IO
 Prelude> :show imports
 import Prelude -- implicit
 Prelude>
 }}}

 I shall look into how to fix this, but I think it needs a significant
 restructuring.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/6007#comment:1>
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