
On Thursday, April 25, 2002, at 03:00 , Alastair Reid wrote:
Now, since there's nothing that prevents the directory hierarchies starting at these roots from overlapping, we have a potential for ambiguity when we want to map module names to filenames.
This suggests that we might want to modify the search algorithm to find all matches and report and error if two or more candidate files are found. If this is a big performance hit, we could make it a :set option.
But wouldn't that just prohibit the use of module names that also appear in the standard libraries? At least we need to stop searching the directory of the importing module to make something useful of this idea.
I agree with Alastair - I think it should be an error if there are two modules with the same name on the search path. If it weren't for (a) the performance hit and (b) the difficulty in portably determining whether two pathnames refer to the same file, I'd have made GHCi do this already. Yes, it would prohibit the use of module names that also appear in the standard libraries. But after all we're moving to hierarchical libraries so there's no need to do that any more! Cheers, Simon