[project @ 2002-04-26 13:34:05 by simonmar]
[ghc-base.git] / Data / Array / IO.hs
index f4faa52..b47e147 100644 (file)
@@ -1,6 +1,6 @@
-{-# OPTIONS -#include "HsCore.h" #-}
+{-# OPTIONS -#include "HsBase.h" #-}
 -----------------------------------------------------------------------------
--- 
+-- |
 -- Module      :  Data.Array.IO
 -- Copyright   :  (c) The University of Glasgow 2001
 -- License     :  BSD-style (see the file libraries/core/LICENSE)
@@ -9,8 +9,6 @@
 -- Stability   :  experimental
 -- Portability :  non-portable
 --
--- $Id: IO.hs,v 1.3 2002/01/02 14:40:10 simonmar Exp $
---
 -- Mutable boxed/unboxed arrays in the IO monad.
 --
 -----------------------------------------------------------------------------
@@ -407,7 +405,7 @@ readChunk fd is_stream ptr init_off bytes = loop init_off bytes
   loop off bytes | bytes <= 0 = return (off - init_off)
   loop off bytes = do
     r' <- throwErrnoIfMinus1RetryMayBlock "readChunk"
-           (read_off (fromIntegral fd) is_stream ptr 
+           (read_off_ba (fromIntegral fd) is_stream ptr 
                (fromIntegral off) (fromIntegral bytes))
            (threadWaitRead fd)
     let r = fromIntegral r'
@@ -454,16 +452,16 @@ hPutArray handle (IOUArray (STUArray l u raw)) count
 -- ---------------------------------------------------------------------------
 -- Internal Utils
 
-foreign import "__hscore_memcpy_dst_off" unsafe 
+foreign import ccall unsafe "__hscore_memcpy_dst_off"
    memcpy_baoff_ba :: RawBuffer -> Int -> RawBuffer -> CSize -> IO (Ptr ())
-foreign import "__hscore_memcpy_src_off" unsafe 
+foreign import ccall unsafe "__hscore_memcpy_src_off"
    memcpy_ba_baoff :: RawBuffer -> RawBuffer -> Int -> CSize -> IO (Ptr ())
 
 illegalBufferSize :: Handle -> String -> Int -> IO a
-illegalBufferSize handle fn (sz :: Int) = 
+illegalBufferSize handle fn sz = 
        ioException (IOError (Just handle)
                            InvalidArgument  fn
-                           ("illegal buffer size " ++ showsPrec 9 sz [])
+                           ("illegal buffer size " ++ showsPrec 9 (sz::Int) [])
                            Nothing)
 
 #endif /* __GLASGOW_HASKELL__ */