[commit: containers] master: Allow test-suites to work with GHC < 7.0. (4b0ef83)
Ian Lynagh
igloo at earth.li
Thu Feb 23 01:15:27 CET 2012
Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4b0ef83dc5e4acf06e21a71412b9274d80456408
>---------------------------------------------------------------
commit 4b0ef83dc5e4acf06e21a71412b9274d80456408
Author: Milan Straka <fox at ucw.cz>
Date: Thu Dec 1 22:33:03 2011 +0100
Allow test-suites to work with GHC < 7.0.
Due to several problems with older versions of GHC and Cabal,
some extensions have to be switched unconditionaly in test-suites
to allow GHC < 7.0 to work.
The reason is
* GHC < 7.0 cannot handle conditional LANGUAGE pragmas and therefore
the extensions have to be specified in cabal file.
* GHC = 7.0 with bundled Cabal cannot handle conditionals in
test-suites and so we cannot enable the extensions conditionally.
When testing with GHC < 7.0 is no longer necessary, the extensions
in test-suites can be removed.
>---------------------------------------------------------------
containers.cabal | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/containers.cabal b/containers.cabal
index 4453f9b..6989813 100644
--- a/containers.cabal
+++ b/containers.cabal
@@ -57,9 +57,10 @@ Library
-- Every test-suite contains the build-depends and options of the library,
-- plus the testing stuff.
--- Testing works for GHC >= 7.0. Test-suites could be modified to compile
--- with GHC < 7.0, but we don't really care, as GHC < 7.0 is bundled with
--- Cabal 1.8.* anyway.
+-- Because the test-suites cannot contain conditionals in GHC 7.0, the extensions
+-- are switched on for every compiler to allow GHC < 7.0 to compile the tests
+-- (because GHC < 7.0 cannot handle conditional LANGUAGE pragmas).
+-- When testing with GHC < 7.0 is not needed, the extensions should be removed.
Test-suite map-lazy-properties
hs-source-dirs: tests, .
@@ -69,6 +70,7 @@ Test-suite map-lazy-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
HUnit,
@@ -85,6 +87,7 @@ Test-suite map-strict-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
HUnit,
@@ -101,6 +104,7 @@ Test-suite set-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
QuickCheck,
@@ -115,6 +119,7 @@ Test-suite intmap-lazy-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
HUnit,
@@ -131,6 +136,7 @@ Test-suite intmap-strict-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
HUnit,
@@ -147,6 +153,7 @@ Test-suite intset-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
QuickCheck,
@@ -161,6 +168,7 @@ Test-suite seq-properties
build-depends: base >= 4.2 && < 5, array, deepseq >= 1.2 && < 1.3, ghc-prim
ghc-options: -O2
+ extensions: MagicHash, DeriveDataTypeable, StandaloneDeriving, Rank2Types
build-depends:
QuickCheck,
More information about the Cvs-libraries
mailing list