Skip to content

Commit c7de1f6

Browse files
committed
Support older ghc and fix warnings
1 parent 083dce7 commit c7de1f6

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

Codec/Compression/Zlib/Stream.hsc

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,15 +109,19 @@ import qualified Data.ByteString.Unsafe as B
109109
import Data.ByteString (ByteString)
110110
import Control.Applicative (Applicative(..))
111111
import Control.Monad (ap,liftM)
112+
#if __GLASGOW_HASKELL__ >= 702
113+
import Control.Monad.ST.Strict hiding (unsafeIOToST)
114+
import Control.Monad.ST.Unsafe
115+
#else
116+
import Control.Monad.ST.Strict
117+
#endif
112118
import Control.Exception (assert)
113119
#ifdef DEBUG
114120
import System.IO (hPutStrLn, stderr)
115121
#endif
116122

117123
import Prelude hiding (length)
118124

119-
import Control.Monad.ST.Strict
120-
121125
#include "zlib.h"
122126

123127

zlib.cabal

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ library
3434
Codec.Compression.Zlib.Raw,
3535
Codec.Compression.Zlib.Internal
3636
other-modules: Codec.Compression.Zlib.Stream
37-
default-language: Haskell2010
37+
if impl(ghc < 7)
38+
default-language: Haskell98
39+
else
40+
default-language: Haskell2010
3841
other-extensions: CPP, ForeignFunctionInterface, RankNTypes, BangPatterns
3942
build-depends: base >= 3 && < 5,
4043
bytestring >= 0.9 && < 0.12

0 commit comments

Comments
 (0)