projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
use 'compare' when using the law of trichotomy
[ghc-hetmet.git]
/
compiler
/
utils
/
StringBuffer.lhs
diff --git
a/compiler/utils/StringBuffer.lhs
b/compiler/utils/StringBuffer.lhs
index
69caf0e
..
e02a3ba
100644
(file)
--- a/
compiler/utils/StringBuffer.lhs
+++ b/
compiler/utils/StringBuffer.lhs
@@
-45,7
+45,6
@@
import Foreign
import System.IO ( hGetBuf, hFileSize,IOMode(ReadMode), hClose
, Handle, hTell )
import System.IO ( hGetBuf, hFileSize,IOMode(ReadMode), hClose
, Handle, hTell )
-import GHC.Ptr ( Ptr(..) )
import GHC.Exts
import GHC.IOBase ( IO(..) )
import GHC.Base ( unsafeChr )
import GHC.Exts
import GHC.IOBase ( IO(..) )
import GHC.Base ( unsafeChr )
@@
-114,7
+113,7
@@
hGetStringBufferBlock handle wanted
withForeignPtr buf $ \ptr ->
do r <- if size == 0 then return 0 else hGetBuf handle ptr size
if r /= size
withForeignPtr buf $ \ptr ->
do r <- if size == 0 then return 0 else hGetBuf handle ptr size
if r /= size
- then ioError (userError $ "short read of file: "++show(r,size,fromIntegral size_i,handle))
+ then ioError (userError $ "short read of file: "++show(r,size,size_i,handle))
else do pokeArray (ptr `plusPtr` size :: Ptr Word8) [0,0,0]
return (StringBuffer buf size 0)
else do pokeArray (ptr `plusPtr` size :: Ptr Word8) [0,0,0]
return (StringBuffer buf size 0)