Problem in load path in CVS repository version of Hugs

Johan Nordlander nordland@cs.chalmers.se
Wed, 27 Feb 2002 23:05:46 +0100


> Now let's see if I understand why it works.
>
>   Using GreenCard (a module name) instead of GreenCard.lhs (a
>   filename) meant that Hugs added the directory containing
>   GreenCard.lhs (i.e., /home/reid/local/gc-2.01/src) to the list of
>   directories to search in the future so that when it later looked for
>   the module Parse, it (correctly) looked in
>   /home/reid/local/gc-2.01/src
>
> Is that it?

Well, the directory /home/reid/local/gc-2.01/src is in the 
search path simply because of the -P option; it's just that the 
search path only plays a role when you demand the loading of a 
module name.  On top of that, Hugs will always extend the search 
path with the current directory and the directory where the 
current module was found (which might not be in the serach path 
proper if the module was specified using an absolute filename).  
This is important when module A imports some private module B 
from the same directory, and module A was loaded using its 
absolute filename.

Phew, I guess this is still quite complicated... :-)

> [Sorry if I seem a bit thick here - you kept me very well informed of
> the changes you were making to the search path but I was pretty
> distracted by my family, returning to Glasgow and starting a (computer
> consulting) company and didn't pay as much attention as I should
> have.]

Not a problem at all!  BTW, is your preferred email address 
still reid@cs.utah.edu?

-- Johan