[Haskell-cafe] Weird ghci behaviour?

Ian Lynagh igloo at earth.li
Fri Jul 20 19:54:45 EDT 2007


Hi Dan,

On Fri, Jul 20, 2007 at 02:12:12PM -0700, 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?

Seems to work for me, on Linux/amd64:

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6
$ echo 'main = putStrLn "Foo"' > q.hs
$ ghc q.hs
$ ghci -v0 q.hs
Prelude Main> main
Foo
Prelude Main>

Can you please give a complete testcase for the problem you're seeing?
Also, exactly which OS/arch are you on?


Thanks
Ian



More information about the Haskell-Cafe mailing list