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.

Cheers
pepe

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?
--
Dan
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to