[GHC] #7231: GHCi erroneously unloads modules after a failed :reload

GHC cvs-ghc at haskell.org
Sun Sep 9 05:50:02 CEST 2012


#7231: GHCi erroneously unloads modules after a failed :reload
------------------------------------------+---------------------------------
 Reporter:  parcs                         |          Owner:                  
     Type:  bug                           |         Status:  new             
 Priority:  normal                        |      Component:  GHCi            
  Version:  7.6.1                         |       Keywords:                  
       Os:  Unknown/Multiple              |   Architecture:  Unknown/Multiple
  Failure:  Compile-time performance bug  |       Testcase:                  
Blockedby:                                |       Blocking:                  
  Related:                                |  
------------------------------------------+---------------------------------
 ----
 Say you have three modules:

 {{{
 module Main where

 import Foo
 import Bar
 }}}

 {{{
 module Foo where
 }}}

 {{{
 module Bar where
 }}}


 And you run the following in `GHCi`:

 {{{
 :load Main
 :! echo '"' >> Bar.hs # alter Bar in such a way that it fails to compile
 :reload
 }}}

 What I expect to have happened is that `Bar` fails to compile and so does
 `Main` (because `Main` imports `Bar`), thus `Bar` and `Main` should get
 unloaded. So in the end `Foo` should be the only module left loaded.

 What I've observed is that not only do `Bar` and `Main` get unloaded, but
 `Foo` does too! Yet `Foo` should not get unloaded because  it has been
 altered.

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



More information about the Glasgow-haskell-bugs mailing list