Libraries and hierarchies

Iavor Diatchki diatchki@cse.ogi.edu
Mon, 04 Aug 2003 20:52:40 +0000


hello,

Alastair Reid wrote:
>>  ...
> 
> 3) Directory name on your system.
> 
>    This would be a little like the current situation with Hugs where
>    you add -P options to the command line to add each package to
>    the searchpath.

i like this, as i've wanted something like this, and it also seems 
simple, although i may be missing something.
if i download a package, i simply put it on my system somewhere,
and add this place to the compiler search path (via a flag, or a 
compiler configuration flag).  then we can have relative and absolute 
imports:  absolute imports would be searched for in the compiler search 
path, while absolute imports will be searched for in the same directory 
as the importing module.  alternatively one could only have one kind of 
import, that is always searched for in the compiler path.  if i want to 
use one version of a library or another, i simply need to adjust the 
path when i compile my program.  thus "import A.B" would mean i want 
module B that is in a subdirectory A of one of the directories in the 
path.  ambiguous imports should be reported as errors.

bye
iavor


-- 
==================================================
| Iavor S. Diatchki, Ph.D. student               |
| Department of Computer Science and Engineering |
| School of OGI at OHSU                          |
| http://www.cse.ogi.edu/~diatchki               |
==================================================