Remove unused imports from base
[ghc-base.git] / GHC / IO / Encoding / UTF32.hs
index 17a817e..9549cf0 100644 (file)
@@ -35,7 +35,7 @@ module GHC.IO.Encoding.UTF32 (
 import GHC.Base
 import GHC.Real
 import GHC.Num
-import GHC.IO
+-- import GHC.IO
 import GHC.IO.Exception
 import GHC.IO.Buffer
 import GHC.IO.Encoding.Types
@@ -189,8 +189,8 @@ utf32be_decode
               c3 <- readWord8Buf iraw (ir+3)
               let x1 = chr4 c0 c1 c2 c3
               if not (validate x1) then invalid else do
-              writeCharBuf oraw ow x1
-              loop (ir+4) (ow+1)
+              ow' <- writeCharBuf oraw ow x1
+              loop (ir+4) ow'
          where
            invalid = if ir > ir0 then done ir ow else ioe_decodingError
 
@@ -215,8 +215,8 @@ utf32le_decode
               c3 <- readWord8Buf iraw (ir+3)
               let x1 = chr4 c3 c2 c1 c0
               if not (validate x1) then invalid else do
-              writeCharBuf oraw ow x1
-              loop (ir+4) (ow+1)
+              ow' <- writeCharBuf oraw ow x1
+              loop (ir+4) ow'
          where
            invalid = if ir > ir0 then done ir ow else ioe_decodingError