Cabal vs Haskell (was RE: build-depends harmful (was RE: import resolution))

Simon Marlow simonmar at
Wed Apr 20 04:46:33 EDT 2005

On 20 April 2005 02:00, S. Alexander Jacobson wrote:

> You appear be proposing to change the definition of a Haskell program
> from a set of Haskell modules connected by import to a set of Cabal
> packages connected by build-depends.

Not at all - the definition of a Haskell program is still a collection
of modules with distinct names.  If we were to "lift the overlap
restriction" then the definition would change to a collection of modules
with distinct (package name, module name) pairs.  Two changes are

   - define module name as (package name, module name) pair

   - in the context of each module's source, there is a mapping from
     module name to package name that is used to resolve an import.

the definition doesn't require Cabal, or build-depends.

Given that this model doesn't rely on Cabal or build-depends, I'm afraid
I don't understand the rest of your post.  I think you may have
misunderstood what the module overlap restriction is.

> == Lifting The Overlap Restriction ==
> The Haskell model is much simpler for the user and sacrifices little
> expressive power.
> Under the Haskell model, M.T means the same thing in every module and
> lifting the overlap restriction means programs just have a lookup
> table mapping module names to module locations; resolution follows
> simply and directly without worrying about package structure.

If programs are still collections of modules with distinct names, then
the module overlap restriction is still in place.

Perhaps you could define some terms more precisely, to avoid confusion:
for example things like "module location", and what you understand by
"overlap restriction".


More information about the Libraries mailing list