[Haskell-cafe] Maintaining test-suite dependencies with cabal
Tobias Dammers
tdammers at gmail.com
Fri Aug 22 17:03:09 UTC 2014
I have found that splitting functionality off into a library is way too
useful for a lot of things anyway, so I'd just do that.
On Aug 22, 2014 6:49 PM, "Bram Neijt" <bneijt at gmail.com> wrote:
> Dear reader,
>
> I have a single executable package in Cabal[1] and I have added a test
> for it using an example configuration from the ltc package[2].
>
> With my test on my executable I can't depend on the main package, but
> I seem to have to repeat the dependencies of my executable, or split
> off functionality into a library. [3]
>
> Can I easily depend on the dependencies of another package or should I
> create a library and depend on that in my test and executable?
>
> All source is at: https://github.com/bneijt/after/
>
> Greetings,
>
> Bram
>
> [1] https://github.com/bneijt/after/blob/master/after.cabal
> [2] https://github.com/scvalex/ltc/blob/master/ltc.cabal
> [3] A part of my cabal file added below
>
> executable after
> main-is: Main.hs
> build-depends: base >=4.7 && <4.8,
> options ==1.*,
> directory ==1.2.*,
> parallel-io ==0.3.*,
> filepath ==1.3.*,
> unix ==2.7.*
> hs-source-dirs: src
> ghc-options: -Wall
> default-language: Haskell2010
>
>
> test-suite afterTests
> hs-source-dirs: test src
> main-is: AfterTest.hs
> type: exitcode-stdio-1.0
> build-depends: base >=4.7 && <4.8,
> unix ==2.7.*, -- Here because of after depending on
> it
> directory ==1.2.*, -- Here because of after
> depending on it
> filepath ==1.3.*, -- Here because of after
> depending on it
> test-framework,
> test-framework-hunit,
> HUnit
> default-language: Haskell2010
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140822/7d1b1b72/attachment.html>
More information about the Haskell-Cafe
mailing list