Ticket #7231 (closed bug: fixed)
GHCi erroneously unloads modules after a failed :reload
|Reported by:||parcs||Owned by:||simonmar|
|Type of failure:||Compile-time performance bug||Difficulty:||Unknown|
|Test Case:||Blocked By:|
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.