Cabal vs Haskell [sic]

S. Alexander Jacobson alex at alexjacobson.com
Mon Apr 25 20:01:56 EDT 2005


On Sun, 24 Apr 2005, Isaac Jones wrote:
> Once again, the current cabal story is not different from the current
> Haskell story.  Please stop saying that.

1. The current Haskell story is that the dependencies of a module are 
the set of modules identified in its import statements.

2. The current Cabal story is that the dependencies of a package are 
the set of packages identified in its build-depends statement.

3. Since, a package may contain Haskell modules, the set of modules on 
which the contained modules depend must themselves dependent on the 
set of packages identified in the package's build-depends statement.

4. A set of modules may be dependent on a set of packages if and only 
if that set of packages is the only set of packages that may contain
them.

5. Since more than one set of packages may contain the same set of 
modules, the current Haskell story cannot be consistent with the 
current Cabal story.

QED

-Alex-

______________________________________________________________
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com


On Sun, 24 Apr 2005, Isaac Jones wrote:

> "S. Alexander Jacobson" <alex at alexjacobson.com> writes:
>
>> On Fri, 22 Apr 2005, Simon Peyton-Jones wrote:
>>> Bottom line: the current story is pretty defensible.  I'm not sure that
>>> keeping names unique by implicitly using package-ids is worth the
>>> bother.
>>
>> If the current Haskell story is that module names are top-level then
>> it is incompatible with the current Cabal story.  The current Cabal
>> story is that module names are implicitly qualified by
>> package-ids. Cabal's build-depends tag says that some set of package
>> names are required to interpret enclosed import declarations.  In
>> other words, that the import declarations are themselves insufficient
>> to identify the external modules required to interpret the enclosed
>> modules.
>
> This is the case in every language I know of, except perhaps for Java
> which requires that you prefix your organizational name to your
> modules.  In fact we could do that in Haskell without changing
> anything.
>
>> I strongly prefer the current Haskell story to the current Cabal story
>> for reasons enumerated at length in this thread*.
>
> Once again, the current cabal story is not different from the current
> Haskell story.  Please stop saying that.  Cabal is layered on Haskell.
>
> Cabal "changes" the interpretation of a Haskell module only in the
> sense that Make changes the interpretation of a Haskell or C program
> or that "-i" changes the interpretation of a Haskell or C program.
> This is obvious, and I agree with it, but the way you keep phrasing it
> makes me wonder if you understand this.
>
> (snip)
>> * Quick recap of arguments against Cabal:
>>
>>    * namespace issues shouldn't be mixed with physical packaging issues
>>    * dev tools operate on source files/directories not packages
>>    * Cabal fragility with respect to changes in build-depends tag
>>    * Cabal fragility with respect to changes in modules of other packages
>>    * incompatibility between unqualified imports and Cabal versioning
>
> These are too vague to respond to (they have already been responded
> to).  But I want to point out that no matter what system you use, if
> the modules that my module depends on change in a bad way, then my
> module will break.  The only way around this is good software
> engineering.
>
>
> peace,
>
>  isaac
>



More information about the Libraries mailing list