Cabal vs Haskell [sic]

Simon Marlow simonmar at microsoft.com
Fri Apr 22 06:35:00 EDT 2005


one minor correction:

On 22 April 2005 11:08, Malcolm Wallace wrote:

> "Needed to build" tells me which interfaces must be available at
> compile-time, no more and no less.  I found recently that ghc-pkg
> (whose input format is essentially Cabal+extras) has a separate
> "builds" field, 

you mean "depends", I think.

And a comment on this:

> As it happens, different compilers blur the boundary between interface
> and implementation to a greater or lesser extent.

To qualify this, I'd say that compilers differ in where they place the
boundary between interface and implementation *of object code only*.
The interface exposed by a source code module is perfectly well defined,
by the language definition.  I think it's important to make this
distinction (I'm sure Malcolm is aware of it, but I just wanted to make
sure it was expressed clearly).

Build-depends uses the source-code notion of interface, not the object
code.  So, build-depends has the same meaning for all compilers.  Again,
this is an important point to bear in mind.

Where the meaning differs, is when you want to replace the object code
of an installed package with new object code.  For example, upgrading a
shared library.  This might be a nice feature to have, but it requires
us to think very carefully about the public interface of object code
(and hence restrict some optimisations, in the case of GHC).

Cheers,
	Simon


More information about the Libraries mailing list