[Haskell-cafe] [ANN] cartel - specify Cabal files using Haskell

Omari Norman omari at smileystation.com
Wed May 28 10:25:14 UTC 2014

On Wed, May 28, 2014 at 2:20 AM, Daniel Trstenjak <
daniel.trstenjak at gmail.com> wrote:

> Hi Omari,
> On Tue, May 27, 2014 at 09:55:59PM -0400, Omari Norman wrote:
> > The Cabal file format works very well for small projects. However, in big
> > projects with a library, many executables, and test suites, some
> irritations
> > emerge. You need to specify dependencies in multiple places, leading to
> > redundancy.
> That's not quite true, you can share the dependencies and specify the
> modules once, but you have to use a different sub directory for each
> section (library, executable, test-suite, benchmark) in the cabal file.
> See: https://github.com/dan-t/hsimport/blob/master/hsimport.cabal

This is a solution only where you have shared code that can be pushed into
the library.  This may not be practical.  Non-trivial tests, for instance,
are going to have dependencies of their own.  See


where three separate components must specify dependencies on text, time,
and transformers.  This was even after I moved a lot of code to the library
for the sole reason of removing Cabal file redundancy.  I could have the
library re-export modules from those packages but that is a kludge.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140528/45878ec8/attachment.html>

More information about the Haskell-Cafe mailing list