logo       

Re: search path wierdness: msg#00024

lang.haskell.glasgow.bugs

Subject: Re: search path wierdness

"Simon Marlow" <simonmar@xxxxxxxxxxxxx> writes:

> > Now presumably the gtk/Graphics/UI/Gtk/General/Signals.hi file
> > remembers the module name. So ghc reads the module name from
> > gtk/Graphics/UI/Gtk/General/Signals.hi and then for some reason looks
> > for Signal.hi which of course it cannot find.
>
> I don't quite follow. When compiling
> gtk/Graphics/UI/Gtk/General/Signals.hs did you specify -ohi
> gtk/Graphics/UI/Gtk/General/Signals.hi?

I think the problem is probably slightly more convoluted. When one
module M exports entities from another N, ghc does not copy the
relevant entities into the interface file for M, but rather plants
a pointer to the interface for N, yes?

So I think probably a module like Graphics.UI.Gtk.Foo is importing
and re-exporting from Graphics.UI.Gtk.Signals. Because, and only
because, the file Signals.hi is in the directory Graphics/UI/Gtk,
the import works. But the re-export is notated in Foo.hi as module
Signals, rather than Graphics.UI.Gtk.Signals, because that is what
the file Signals.hi claimed as its true module name.

Then, a module in a different directory, let's say Graphics.Bar,
imports Graphics.UI.Gtk.Foo, discovers a need for module Signal,
and cannot find it.

Regards,
Malcolm


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise