import Char ( chr )
-- urk!
-#include "../lib/std/cbits/error.h"
+#include "../lib/std/cbits/stgerror.h"
#if __GLASGOW_HASKELL__ >= 303
import IO ( openFile, slurpFile )
#endif
#if __GLASGOW_HASKELL__ < 301
-import IOBase ( IOError(..), IOErrorType(..) )
+import IOBase ( Handle, IOError(..), IOErrorType(..),
+ constructErrorAndFail )
import IOHandle ( readHandle, writeHandle, filePtr )
import PackBase ( unpackCStringBA )
#else
reAllocMem ptr sz = do
chunk <- _ccall_ realloc ptr sz
if chunk == nullAddr
-#ifndef __HASKELL98__
- then fail (userError "reAllocMem")
-#else
+#if __GLASGOW_HASKELL__ >= 400
then fail "reAllocMem"
+#else
+ then fail (userError "reAllocMem")
#endif
else return chunk