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
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
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