| Error (?) with relative paths
| Version: March 1999
| OS       Linux 2.0.35 (Suse5.3)
| 
| Diagnosis:
|   importing modules have to be higher in file hierarchy
|   than imported modules
| 
| ...

I think you're just running into one of the limitations of the
import chasing mechanism.  A relevant quote from the Hugs user
manual is:

  "You should also be aware that Hugs uses the names of files in
  deciding whether a particular import has already been loaded, so
  you should avoid situations where a single file is referred to
  by more than one name.  For example, you should not assume that
  Hugs will be able to determine whether Demo.hs and ./Demo.hs are
  references to the same file. "

In the first of your examples, it turns out that each file is
accessed by only one name.  In the second, however, A gets accessed
by two different names, which confuses the import chasing mechanism.
Perhaps there is a way to make import chasing smart enough to avoid
this.  But, for now, I'm afraid this is one of the rare situations
where you need to switch import chasing off (-i) and either load the
files manually or use a project file.

All the best,
Mark

Reply via email to