@@ -94,11 +94,15 @@ module Codec.Compression.Zlib.Stream (
94
94
95
95
) where
96
96
97
+ -- Note we don't use the MIN_VERSION_* macros here for compatability with
98
+ -- old Cabal versions that come with old GHC, that didn't provide these
99
+ -- macros for .hsc files. So we use __GLASGOW_HASKELL__ as a proxy.
100
+
97
101
import Foreign
98
102
( Word8 , Ptr , nullPtr , plusPtr , peekByteOff , pokeByteOff
99
103
, ForeignPtr , FinalizerPtr , mallocForeignPtrBytes , addForeignPtrFinalizer
100
104
, withForeignPtr , touchForeignPtr , minusPtr )
101
- #if MIN_VERSION_base(4,4,0)
105
+ #if __GLASGOW_HASKELL__ >= 702
102
106
import Foreign.ForeignPtr.Unsafe ( unsafeForeignPtrToPtr )
103
107
import System.IO.Unsafe ( unsafePerformIO )
104
108
#else
@@ -112,12 +116,12 @@ import Foreign.C
112
116
import Data.ByteString.Internal (nullForeignPtr )
113
117
import qualified Data.ByteString.Unsafe as B
114
118
import Data.ByteString (ByteString )
115
- #if !(MIN_VERSION_base(4,8,0) )
119
+ #if !(__GLASGOW_HASKELL__ >= 710 )
116
120
import Control.Applicative (Applicative (.. ))
117
121
#endif
118
122
import Control.Monad (ap ,liftM )
119
- #if MIN_VERSION_base(4,4,0)
120
- #if MIN_VERSION_base(4,7,0)
123
+ #if __GLASGOW_HASKELL__ >= 702
124
+ #if __GLASGOW_HASKELL__ >= 708
121
125
import Control.Monad.ST.Strict
122
126
#else
123
127
import Control.Monad.ST.Strict hiding (unsafeIOToST )
0 commit comments