Skip to content

Commit 9964de8

Browse files
committed
#7, ensure you compile back to GHC 7.0
1 parent 15cb310 commit 9964de8

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Codec/Compression/Zlib/Internal.hs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,11 @@ import Control.Monad (when)
7878
import Control.Exception (Exception, throw, assert)
7979
import Control.Monad.ST.Lazy hiding (stToIO)
8080
import Control.Monad.ST.Strict (stToIO)
81-
import Control.Monad.ST.Unsafe (unsafeIOToST)
81+
#if __GLASGOW_HASKELL__ >= 702
82+
import qualified Control.Monad.ST.Unsafe as Unsafe (unsafeIOToST)
83+
#else
84+
import qualified Control.Monad.ST.Strict as Unsafe (unsafeIOToST)
85+
#endif
8286
import Data.Typeable (Typeable)
8387
import qualified Data.ByteString.Lazy as L
8488
import qualified Data.ByteString.Lazy.Internal as L
@@ -735,7 +739,7 @@ mkStateIO = stToIO Stream.mkState
735739

736740
runStreamST :: Stream a -> Stream.State s -> ST s (a, Stream.State s)
737741
runStreamIO :: Stream a -> Stream.State RealWorld -> IO (a, Stream.State RealWorld)
738-
runStreamST strm zstate = strictToLazyST (unsafeIOToST noDuplicate >> Stream.runStream strm zstate)
742+
runStreamST strm zstate = strictToLazyST (Unsafe.unsafeIOToST noDuplicate >> Stream.runStream strm zstate)
739743
runStreamIO strm zstate = stToIO (Stream.runStream strm zstate)
740744

741745
compressStreamIO :: Stream.Format -> CompressParams -> CompressStream IO

0 commit comments

Comments
 (0)