Skip to content

Commit b95f3ab

Browse files
ndmitchelltolysz
authored andcommitted
#7, ensure you compile back to GHC 7.0
1 parent 378acc2 commit b95f3ab

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
@@ -79,7 +79,11 @@ import Control.Monad (when)
7979
import Control.Exception (Exception, throw, assert)
8080
import Control.Monad.ST.Lazy hiding (stToIO)
8181
import Control.Monad.ST.Strict (stToIO)
82-
import Control.Monad.ST.Unsafe (unsafeIOToST)
82+
#if __GLASGOW_HASKELL__ >= 702
83+
import qualified Control.Monad.ST.Unsafe as Unsafe (unsafeIOToST)
84+
#else
85+
import qualified Control.Monad.ST.Strict as Unsafe (unsafeIOToST)
86+
#endif
8387
import Data.Typeable (Typeable)
8488
import qualified Data.ByteString.Lazy as L
8589
import qualified Data.ByteString.Lazy.Internal as L
@@ -740,7 +744,7 @@ mkStateIO = stToIO Stream.mkState
740744

741745
runStreamST :: Stream a -> Stream.State s -> ST s (a, Stream.State s)
742746
runStreamIO :: Stream a -> Stream.State RealWorld -> IO (a, Stream.State RealWorld)
743-
runStreamST strm zstate = strictToLazyST (unsafeIOToST noDuplicate >> Stream.runStream strm zstate)
747+
runStreamST strm zstate = strictToLazyST (Unsafe.unsafeIOToST noDuplicate >> Stream.runStream strm zstate)
744748
runStreamIO strm zstate = stToIO (Stream.runStream strm zstate)
745749

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

0 commit comments

Comments
 (0)