Module System

Henrik Nilsson nhn at Cs.Nott.AC.UK
Tue Feb 21 10:50:29 EST 2006


Hi all,

Georg Martius wrote:

 > I have some proposals for changes of the hierarchical module system as
 > it is at the moment.
 > [...]
 > The hierarchical name can be derived from the place in the filesystem.

This is not a comment about the above proposal in itself, which arguably 
has its merits, but rather a meta comment.

I get very anxious whenever I see "the file system" being mentioned
in the context of a *language* specification (as opposed to, say,
a specification of standard language libraries for interfacing with
file systems).

Some reasons:
* File systems have all kinds of quirks one would rather not deal with
   in a language spec.
* File systems can differ radically between different operating systems.
   In fact, even within an OS, as OS's these days tend to support many
   file systems simultaneously.
* A valid module names in a language is not necessarily the same
   as a valid file name. (Yes, bijective mappings could be defined,
   but they would only be valid for a specific set of file systems.)
* Even if we assume that the notion of a hierachical module name space
   always can be mapped to a corresponding file hierarchy in a simple
   way, why should that assumption be made in a language specification?

   In my opinion it is the task of the programming environment to locate
   the source files and interfaces that make up a semantically meaningful
   unit, and that semantics should be completely independent of where
   the different pieces happen to be stored.

I'm already somewhat unhappy about the way most present Haskell tools
map module names to path names (I'd generally prefer to have the
possibility to flatten my file hierarchies by, say, using dots in
my file names), but at least these assumptions are not in the Haskell
98 language definition.

So, please, to the extent possible, let's keep the file system
out of the Haskell' definition!

All the best,

/Henrik

-- 
Henrik Nilsson
School of Computer Science and Information Technology
The University of Nottingham
nhn at cs.nott.ac.uk


This message has been checked for viruses but the contents of an attachment
may still contain software viruses, which could damage your computer system:
you are advised to perform your own checks. Email communications with the
University of Nottingham may be monitored as permitted by UK legislation.



More information about the Haskell-prime mailing list