X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Futils%2FStringBuffer.lhs;h=d7135353a171568cc418ea8d0479b8d2de0aeda6;hp=18359456be94d75eadc3b8a79c6e9efc6bbd8452;hb=7fc749a43b4b6b85d234fa95d4928648259584f4;hpb=33918805ffc2e2a6fc9ff74ae4ce55052151ba90 diff --git a/compiler/utils/StringBuffer.lhs b/compiler/utils/StringBuffer.lhs index 1835945..d713535 100644 --- a/compiler/utils/StringBuffer.lhs +++ b/compiler/utils/StringBuffer.lhs @@ -6,6 +6,13 @@ Buffers for scanning string input stored in external arrays. \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module StringBuffer ( StringBuffer(..), @@ -113,7 +120,7 @@ hGetStringBufferBlock handle wanted 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)