@@ -47,7 +47,7 @@ toBufIOWith buf !size io (Builder build) = loop firstStep
47 firstStep = build (buildStep finalStep)
47 firstStep = build (buildStep finalStep)
48 finalStep (BufRange p _) = return $ Done p ()
48 finalStep (BufRange p _) = return $ Done p ()
49 bufRange = BufRange buf (buf `plusPtr` size)
49 bufRange = BufRange buf (buf `plusPtr` size)
50− runIO ptr = toBS buf (ptr `minusPtr` buf) >>= io
50+ runIO ptr = bufferIO buf (ptr `minusPtr` buf) io
51 loop step = do
51 loop step = do
52 signal <- runBuildStep step bufRange
52 signal <- runBuildStep step bufRange
53 case signal of
53 case signal of