Attempt to fix test build with GHC <= 7.6
authorBryan O'Sullivan <bos@serpentine.com>
Tue, 6 Dec 2016 17:09:05 +0000 (17:09 +0000)
committerBryan O'Sullivan <bos@serpentine.com>
Tue, 6 Dec 2016 17:09:05 +0000 (17:09 +0000)
tests/text-tests.cabal

index 56d6a47..04bbc5d 100644 (file)
@@ -20,6 +20,11 @@ flag hpc
   default:     False
   manual:      True
 
+flag bytestring-builder
+  description: Depend on the bytestring-builder package for backwards compatibility.
+  default: False
+  manual: False
+
 executable text-tests
   main-is: Tests.hs
 
@@ -48,7 +53,6 @@ executable text-tests
     HUnit >= 1.2,
     QuickCheck >= 2.7,
     base == 4.*,
-    bytestring,
     deepseq,
     directory,
     quickcheck-unicode,
@@ -58,6 +62,12 @@ executable text-tests
     test-framework-quickcheck2 >= 0.2,
     text-tests
 
+  if flag(bytestring-builder)
+    build-depends: bytestring         >= 0.9    && < 0.10.4,
+                   bytestring-builder >= 0.10.4
+  else
+    build-depends: bytestring         >= 0.10.4
+
 executable text-tests-stdio
   main-is:        Tests/IO.hs
 
@@ -137,7 +147,12 @@ library
     array,
     base == 4.*,
     binary,
-    bytestring,
     deepseq,
     ghc-prim,
     integer-gmp
+
+  if flag(bytestring-builder)
+    build-depends: bytestring         >= 0.9    && < 0.10.4,
+                   bytestring-builder >= 0.10.4
+  else
+    build-depends: bytestring         >= 0.10.4