diff --git a/inline-r/inline-r.cabal b/inline-r/inline-r.cabal index 04e7f41a..e483772e 100644 --- a/inline-r/inline-r.cabal +++ b/inline-r/inline-r.cabal @@ -39,7 +39,29 @@ source-repository head location: git://github.com/tweag/HaskellR.git subdir: inline-r +common common-config + ghc-options: -Werror=unused-packages -Wall + default-language: Haskell2010 + +common common-test-and-benchmark-config + import: common-config + ghc-options: -threaded + hs-source-dirs: tests + +common common-test-suite-deps + build-depends: + inline-r, + base >=4.6 && <5, + tasty-hunit >=0.4.1 && <0.11, + +common common-benchmark-deps + build-depends: + inline-r, + base >=4.6 && <5, + criterion >=0.8 && <1.7, + library + import: common-config exposed-modules: Control.Memory.Region Data.Vector.SEXP @@ -88,7 +110,6 @@ library heredoc >=0.2 && <0.3, inline-c >=0.6 && <0.10, mtl >=2.1 && <2.4, - pretty >=1.1 && <1.2, primitive >=0.5 && <0.9, process >=1.2 && <1.7, reflection >=2 && <2.2, @@ -96,9 +117,6 @@ library template-haskell >=2.8 && <2.21, temporary >=1.2 && <1.4, text >=0.11 && <2.1, - th-lift >=0.6 && <0.9, - th-orphans >=0.8 && <0.14, - transformers >=0.3 && <0.7, vector >=0.10 && <0.14, if impl(ghc <9) build-depends: @@ -111,7 +129,6 @@ library includes: cbits/missing_r.h c-sources: cbits/missing_r.c include-dirs: cbits - default-language: Haskell2010 other-extensions: CPP ForeignFunctionInterface @@ -125,31 +142,26 @@ library ghc-options: -freduction-depth=32 --- We don't use ticks for promoted constructors, because we use --- promoted constructors heavily and because they confuse hsc2hs. - ghc-options: -Wall -fno-warn-unticked-promoted-constructors + ghc-options: -fno-warn-unticked-promoted-constructors test-suite tests - main-is: tests.hs + import: + common-test-and-benchmark-config, + common-test-suite-deps, type: exitcode-stdio-1.0 + main-is: tests.hs build-depends: - inline-r, - base >=4.6 && <5, bytestring >=0.10 && <0.12, directory >=1.2 && <1.4, - filepath >=1.3 && <1.5, heredoc >=0.2 && <0.3, ieee754 >=0.7 && <0.9, - mtl >=2.0 && <2.4, - process >=1.2 && <1.7, quickcheck-assertions >=0.1.1 && <0.4, singletons >=0.10 && <3.1, - strict >=0.3.2 && <0.6, tasty >=0.11 && <1.5, tasty-expected-failure >=0.11 && <0.13, - tasty-golden >=2.3 && <2.4, tasty-hunit >=0.4.1 && <0.11, tasty-quickcheck >=0.4.1 && <0.11, temporary >=1.2 && <1.4, - text >=0.11 && <2.1, vector >=0.12.3.1 && <0.14, if !os(windows) build-depends: unix >=2.5 && <2.9, @@ -161,92 +173,68 @@ test-suite tests Test.Regions Test.Vector Test.Matcher - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 test-suite test-qq - main-is: test-qq.hs + import: + common-test-and-benchmark-config, + common-test-suite-deps, type: exitcode-stdio-1.0 + main-is: test-qq.hs build-depends: - inline-r, - base >=4.6 && <5, mtl >=2.0 && <2.4, - process >=1.2 && <1.7, - tasty-hunit >=0.4.1 && <0.11, singletons >=0.9 && <3.1, text >=0.11 && <2.1, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 test-suite test-shootout - main-is: test-shootout.hs + import: + common-test-and-benchmark-config, + common-test-suite-deps, type: exitcode-stdio-1.0 + main-is: test-shootout.hs other-modules: Test.Scripts build-depends: - inline-r, - base >=4.6 && <5, filepath >=1.3 && <1.5, process >=1.2 && <1.7, silently >=1.2 && <1.3, - tasty >=0.3 && <1.5, - tasty-hunit >=0.4.1 && <0.11, + tasty >=0.11 && <1.5, template-haskell >=2.8 && <2.21, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 if os(windows) buildable: False test-suite test-env1 - main-is: test-env1.hs + import: + common-test-and-benchmark-config, + common-test-suite-deps, type: exitcode-stdio-1.0 + main-is: test-env1.hs build-depends: - inline-r, - base >=4.6 && <5, - tasty >=0.3 && <1.5, - tasty-hunit >=0.4.1 && <0.11, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 + tasty >=0.11 && <1.5, test-suite test-env2 - main-is: test-env2.hs + import: + common-test-and-benchmark-config, + common-test-suite-deps, type: exitcode-stdio-1.0 + main-is: test-env2.hs build-depends: - inline-r, - base >=4.6 && <5, - tasty >=0.3 && <1.5, - tasty-hunit >=0.4.1 && <0.11, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 + tasty >=0.11 && <1.5, benchmark bench-qq + import: + common-test-and-benchmark-config, + common-benchmark-deps, main-is: bench-qq.hs type: exitcode-stdio-1.0 build-depends: - inline-r, - base >=4.6 && <5, - criterion >=0.8 && <1.7, filepath >=1.3 && <1.5, - process >=1.2 && <1.7, template-haskell >=2.8 && <2.21, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010 benchmark bench-hexp + import: + common-test-and-benchmark-config, + common-benchmark-deps, main-is: bench-hexp.hs type: exitcode-stdio-1.0 build-depends: - inline-r, - base >=4.6 && <5, - criterion >=0.8 && <1.7, primitive >=0.5 && <0.9, - vector >=0.10 && <0.14, singletons >=2.7 && <3.1, - ghc-options: -Wall -threaded - hs-source-dirs: tests - default-language: Haskell2010