Libraries and hierarchies

Iavor Diatchki diatchki@cse.ogi.edu
Tue, 05 Aug 2003 17:46:50 +0000


hello,

Simon Peyton-Jones wrote:
> [Nothing new in this message: just a summary, with some useful
> terminology.]
thanks --  this was really helpful. i was kind of confused on the issue 
of distributing a package in source and binary format, but i think i 
understand the issues now.

> ...
> I personally think that using GUIDs for package names would be a
> mistake.  They are essentially opaque to people, so there needs to be
> some separate infrastructure to describe what a GUID names, and the
> extra layer of indirection seems to buy little.  It's not hard to have
> unique package names (I claim) and that'll do the job nicely.  Indeed a
> package name, as suggested here, then *is* a globally unique ID, or
> GUID, only with a comprehensible name.
i completely agree with this.

> Either way, a value constructed by package coll-1.0 will be
> type-incompatible with functions in coll-2.0.  The former will have
> original names "coll-1.0:Foo.T" while the latter will have
> "coll-2.0:Foo.T".  Trying to provide transparent type upgrade is too
> hard.
that seems resonable.  presumably to upgrade a binary package to use a 
new library, i simply need to specify a new mapping in its grafting 
file, and recompile the package.  is that correct?

> Manuel didn't like the fact that an import could mean "relative or
> absolute".  But presumably we want to continue to write little programs
> with three modules A, B, Main, and have Main just say 'import A'.  So
> presumably the current directory is always implicitly grafted into the
> module hierarchy at the root -- and that is all we need for making
> internal references within a package work out.
am i right in assuming that "current directory" refers to the directory 
in which the file being compiled is located? e.g.
if module Main has a declartion "import M"
ghc A/B/Main.hs
will look for "A/B/M.hs"

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               |
==================================================