ghci confused by hi files

Daniel Fischer at
Tue Jan 16 09:40:25 EST 2007

Am Dienstag, 16. Januar 2007 12:12 schrieb Yitzchak Gale:
> I have observed the following weird behavior:
> When I define an instance of a certain MPTC
> in a separate module from the definition of
> the class, ghci's ability to recognize the
> methods of the class seems to vary depending
> on whether or not hi files exist for the modules.

This has nothing to do with MPTC's, the same behaviour occurs with H98 
Pertinent to this is section 3.4.3 of the user's guide, "What's really in 
scope at the prompt".
For compiled modules, only the exports of these are in scope. 
So this is documented behaviour.
Fix: re-export Oops from Whoops.


> I am using the current Debian build of GHC 6.6.
> Below are a set of three files that reproduce the
> behavior, and a shell session that demonstrates
> it.
> Before I compile the program, ghci works fine.
> After I compile with ghc  - thus generating hi files -
> ghci gets confused. Then I delete the hi files
> and everything is fine again.
> Thanks,
> Yitz

More information about the Glasgow-haskell-users mailing list