new release of LIP prototype API

Simon Marlow simonmar at microsoft.com
Tue Feb 24 12:19:17 EST 2004


 
> (snip)
> > I've downloaded the latest, but I'm having a hard time 
> getting my head
> > around the overall structure.  It feels to me a bit like a tangled
> > ball of string, whose free end I cannot find.  (This a comment on my
> > understanding, not your code/design!)
> 
> :)

Allow me to try to give a top-down overview of the structure, which
should help you find the end(s) of the string.

A Haskell library (or application?) comes with a Haskell program in the
form of a file named Setup.hs.  This program does the following:

  - it accepts certain standard command-line options (build all, build
    default etc.)

  - It knows how to build, and install, the library using sensible
    defaults.  It does this by either

      - Invoking the LIP build/install system in Distribution.Build
        and Distribution.Install, or

      - Invoking a custom build system (standard configure; make; 
        make install stuff).

   - Once installed, Setup.hs registers the package using the 
     Distribution.Package interface.


There are still quite a few questions to answer here, some of which
Graham brought up.  One is how do we tweak the installation locations
for the libraries, and other build/install-time options?  Normally this
is done by passing arguments to configure: should we have more options
to Setup.hs for these things?

Looking at the proposal, Perhaps Setup.lhs should have a configure step
too.  Something like this:

  $ ./Setup.lhs configure prefix=/usr/local HC=/usr/bin/ghc
  $ ./Setup.lhs build
  $ ./Setup.lhs install
  $ ./Setup.lhs uninstall

(registation is done as part of install).  Note the uninstall step,
which also unregisters the package.

Does it matter which compiler is used to run Setup.lhs?  I claim yes
(see previous discussions).

Cheers,
	Simon


More information about the Libraries mailing list