File tree Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Expand file tree Collapse file tree 2 files changed +12
-4
lines changed Original file line number Diff line number Diff line change 1
- {-# LANGUAGE StandaloneDeriving #-}
2
- {-# OPTIONS_GHC -fno-warn-orphans #-}
1
+ {-# LANGUAGE CPP #-}
3
2
4
3
module Main where
5
4
@@ -24,7 +23,10 @@ import qualified Data.ByteString.Char8 as BS.Char8
24
23
import qualified Data.ByteString.Lazy as BL
25
24
import qualified Data.ByteString as BS
26
25
import System.IO
26
+ #if !(MIN_VERSION_base(4,6,0))
27
27
import Prelude hiding (catch )
28
+ #endif
29
+
28
30
29
31
30
32
main :: IO ()
@@ -161,7 +163,7 @@ test_right_dictionary = do
161
163
dict <- readSampleData " custom-dict.zlib-dict"
162
164
let decomp = decompressIO zlibFormat defaultDecompressParams {
163
165
decompressDictionary =
164
- Just (BL. toStrict dict)
166
+ Just (toStrict dict)
165
167
}
166
168
assertDecompressOk hnd decomp
167
169
@@ -203,6 +205,12 @@ test_exception =
203
205
msg <- assertDataFormatError err
204
206
msg @?= " incorrect data check"
205
207
208
+ toStrict :: BL. ByteString -> BS. ByteString
209
+ #if MIN_VERSION_bytestring(0,10,0)
210
+ toStrict = BL. toStrict
211
+ #else
212
+ toStrict = BS. concat . BL. toChunks
213
+ #endif
206
214
207
215
--------------
208
216
-- HUnit Utils
Original file line number Diff line number Diff line change @@ -76,7 +76,7 @@ test-suite tests
76
76
build-depends : base, bytestring, zlib,
77
77
QuickCheck == 2. *,
78
78
HUnit == 1.2. *,
79
- tasty == 0.8. * ,
79
+ tasty >= 0.8 && < 0.11 ,
80
80
tasty-quickcheck == 0.8. *,
81
81
tasty-hunit == 0.8. *
82
82
ghc-options : -Wall
You can’t perform that action at this time.
0 commit comments