diff --git a/Data/Text/Array.hs b/Data/Text/Array.hs
--- a/Data/Text/Array.hs
+++ b/Data/Text/Array.hs
@@ -60,7 +60,11 @@
 #if defined(ASSERTS)
 import Control.Exception (assert)
 #endif
+#if __GLASGOW_HASKELL__ >= 702
+import Control.Monad.ST.Unsafe (unsafeIOToST)
+#else
 import Control.Monad.ST (unsafeIOToST)
+#endif
 import Data.Bits ((.&.), xor)
 import Data.Text.Unsafe.Base (inlinePerformIO)
 import Data.Text.UnsafeShift (shiftL, shiftR)
diff --git a/Data/Text/Foreign.hs b/Data/Text/Foreign.hs
--- a/Data/Text/Foreign.hs
+++ b/Data/Text/Foreign.hs
@@ -33,7 +33,11 @@
 #if defined(ASSERTS)
 import Control.Exception (assert)
 #endif
+#if __GLASGOW_HASKELL__ >= 702
+import Control.Monad.ST.Unsafe (unsafeIOToST)
+#else
 import Control.Monad.ST (unsafeIOToST)
+#endif
 import Data.Text.Internal (Text(..), empty)
 import Data.Text.Unsafe (lengthWord16)
 import qualified Data.Text.Array as A
diff --git a/tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs b/tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs
--- a/tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs
+++ b/tests/tests/src/Data/Text/Tests/QuickCheckUtils.hs
@@ -276,13 +276,13 @@
 
 -- Newline and NewlineMode have standard Show instance from GHC 7 onwards
 #if __GLASGOW_HASKELL__ < 700
-instance Show Newline where
-    show CRLF = "CRLF"
-    show LF   = "LF"
+instance Show IO.Newline where
+    show IO.CRLF = "CRLF"
+    show IO.LF   = "LF"
 
-instance Show NewlineMode where
-    show (NewlineMode i o) = "NewlineMode { inputNL = " ++ show i ++
-                             ", outputNL = " ++ show o ++ " }"
+instance Show IO.NewlineMode where
+    show (IO.NewlineMode i o) = "NewlineMode { inputNL = " ++ show i ++
+                                ", outputNL = " ++ show o ++ " }"
 # endif
 
 instance Arbitrary IO.NewlineMode where
diff --git a/text.cabal b/text.cabal
--- a/text.cabal
+++ b/text.cabal
@@ -1,5 +1,5 @@
 name:           text
-version:        0.11.1.8
+version:        0.11.1.9
 homepage:       https://github.com/bos/text
 bug-reports:    https://github.com/bos/text/issues
 synopsis:       An efficient packed Unicode text type.
