GHC 6.4 release candidates available [GHCi reloads incorrectly]
Simon David Foster
s.d.f at btinternet.com
Fri Feb 11 08:50:26 EST 2005
If I have two simple modules, Module1 and Module2 like this;
module Module1 where
f = "hello"
module Module2 where
import Module1
I load up Module2 in GHCi, and I can evaluate f in Module1;
Compiling Module1 ( ./Module1.hs, interpreted )
Compiling Module2 ( Module2.hs, interpreted )
Ok, modules loaded: Module2, Module1.
*Module2> f
"hello"
Now I change Module1 to
module Module1 where
f = "hello2"
and reload; this happens in the GHC 6.4 RC:
*Module2> :r
Compiling Module1 ( ./Module1.hs, interpreted )
Skipping Module2 ( Module2.hs, interpreted )
Ok, modules loaded: Module2, Module1.
Prelude Module2>
And I can no longer get at anything in Module1 (this is generally true
of any imported modules), only stuff in Module2. Instead I have to do a
full reload. In GHC 6.2, if you did this it reloaded both modules and
everything was fine, so I'm guessing this is incorrect behaviour.
-Si.
--
Simon David Foster <s.d.f at btinternet.com>
More information about the Glasgow-haskell-users
mailing list