[Haskell-cafe] Re: GSoC: Improving Cabal's Test Support

Gregory Crosswhite gcross at phys.washington.edu
Tue Apr 6 22:12:10 EDT 2010

As I understand it, there is only one place in the Cabal package where *build* dependencies appear, in contrast to lines in the Library and Executable sections where the *install* dependencies appear (i.e., you might not need all of the build dependences around merely to use the library or programs).  So there would need to be a way of specifying in the .cabal file in a convenient way (i.e., hopefully without having the package writer manually specify conditionals) that some of the *build* dependencies only apply if one is building the test packages.


On Apr 6, 2010, at 6:37 PM, Thomas Tuegel wrote:

> On Tue, Apr 6, 2010 at 9:00 PM, Gregory Crosswhite
> <gcross at phys.washington.edu> wrote:
>> Sounds like a good plan to me!
>> You still need some way to separate out the test dependencies from the main build dependencies, though.  Perhaps as a separate line in the main Cabal header section?
> I think I can implement this inside Cabal in the conversion from
> GenericPackageDescription to PackageDescription, as if it were
> implemented all in terms of conditionals.  So, if tests are enabled,
> the test executables are in the PackageDescription and their
> dependencies get pulled in; if tests are disabled, the executables get
> cut from the PackageDescription.  Am I missing something?
> -- 
> Thomas Tuegel

More information about the Haskell-Cafe mailing list