\begin{code}
#if __GLASGOW_HASKELL__ < 303
-ioError = fail
mayBlock fo thing = thing
writeCharOffAddr :: Addr -> Int -> Char -> IO ()
(\ handle ->
do sz <- hFileSize handle
if sz > toInteger (maxBound::Int)
- then ioError (userError "slurpFile: file too big")
+ then IOERROR (userError "slurpFile: file too big")
else do
let sz_i = fromInteger sz
sz_i' = (sz_i * 12) `div` 10 -- add 20% for tabs
-- and add 1 to allow room for the final sentinel \NUL at
-- the end of the file.
(chunk', rc) <- slurpFile 0# 0# chunk chunk_sz (chunk_sz -# (tAB_SIZE +# 1#))
+#if __GLASGOW_HASKELL__ < 404
writeHandle handle handle_
+#endif
if rc < (0::Int)
then constructErrorAndFail "slurpFile"
else return (chunk', rc+1 {-room for sentinel-})