Multi-library/package support for cabal

Bardur Arantsson spam at
Fri Jun 19 18:24:55 UTC 2015

On 06/19/2015 08:14 PM, Bardur Arantsson wrote:
> Hi all,

Oh, yes, I should add. I've been thinking about a couple of approaches
for how to achieve this ("UI-wise" so to speak) and would like some
"guesstimate" of feasibility by people in the know.

1st approach: Use a single cabal file to describe a full set of
libraries (and executables) and perform dependency resolution over the
whole set, thus hopefully at least ensuring internal consistency. Some
sort of shorthand would perhaps be useful to avoid having to specify
common dependencies and version bounds redundantly. I could imagine
Hackage would have issues with this, but if anyone who knows more about
Hackage internals could chime up...? I guess it might be possible to
"split" such a meta-.cabal file into smaller files for upload to Hackage
-- if nothing else then to avoid backward-compatibility issues.

2nd approach: Some sort of meta-tooling which could gather up multiple
cabal files, create a single sandbox and resolve dependencies for all
subprojects in a single step. Probably easier to implement, but less

A general observation: In either case we want the compile/install step
to report errors and warnings consistently. At least my current
hobbled-together Python script uses the ability to do "cabal install
[flags] dir1 dir2 dir3 ...", but this means that you miss out on
warnings in many cases since warnings for dependencies aren't printed by
default for "install". These are the kinds of annoyances that I want to


More information about the cabal-devel mailing list