[Haskell-cafe] Weird ghci behaviour?
mnislaih at gmail.com
Tue Jul 24 05:09:54 EDT 2007
I can give the following partial explanation.
When you run "ghc test.hs" it compiles your test file and produces
some auxiliar files at the same time.
When you run ghci afterwards, if the mod. date of the auxiliar files
is more recent than that of the source file, it directly loads the
object code form of the source file.
So it appears that ghci is having trouble when loading the object
code version. Whereas if it's not, it loads the module interpreted.
Of course, if you remove test.hi, ghci will always load the file
interpreted, and so the problem doesn't manifest.
On 20/07/2007, at 23:12, Dan Piponi wrote:
> On Unix-like OSes:
> If I run "ghc test.hs" and then run "ghci test.hs", ghci fails to load
> up my code. I have to touch test.hs and then run ghci. I can
> understand ghci refusing to recompile something it thinks it has
> already compiled. But it appears to refuse to load it into an
> interactive session - which is less useful. In fact, removing test.hi
> makes ghci work again.
> This is ghc 6.6. Anyone else seeing this?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe