RFC: External library infrastructure

Alastair Reid alastair@reid-consulting-uk.ltd.uk
22 Nov 2002 23:04:25 +0000

> On Tue, Nov 12, 2002 at 05:56:13PM -0000, Simon Marlow wrote:
>> Absolutely.  I didn't mean to sound so GHC-centric.  It would be
>> great if the same infrastructure supports multiple
>> compilers/interpreters.

Ross Paterson <ross@soi.city.ac.uk> writes:
> On the other hand, my impression is that if someone did something
> that worked with GHC it would be fairly easy to adapt to Hugs,
> probably with a script that preprocessed a tree of modules.  The
> exception is modules that need extra command-line arguments,
> particularly FFI modules.  For those, Hugs needs a mechanism to set
> options on a per-file and per-hierarchy basis.

I think adding a package like mechanism to Hugs would (or, at least, could):

1) Provide a place to put those extra ffi flags.

2) Make it easier to distribute Hugs packages.
   Instead of editing your HUGSFLAGS environment variable you run
   pkg-add (or whatever).

3) By having a single file (the package description file) containing a
   single copy of all the information needed by any compiler, we might
   make it easier to maintain libraries such that they 'just work' on
   all compilers instead of requiring the writer or interested parties
   to maintain multiple copies of what is, essentially, the same

Obviously, the 3rd reason is the one of most relevance to this thread.

Alastair Reid                 alastair@reid-consulting-uk.ltd.uk  
Reid Consulting (UK) Limited  http://www.reid-consulting-uk.ltd.uk/alastair/