-- Async versions of the read/write primitives, for the non-threaded RTS
asyncReadRawBuffer loc fd is_stream buf off len = do
- (l, rc) <- asyncReadBA fd (if is_stream then 1 else 0)
+ (l, rc) <- asyncReadBA (fromIntegral fd) (if is_stream then 1 else 0)
(fromIntegral len) off buf
if l == (-1)
then
else return (fromIntegral l)
asyncReadRawBufferPtr loc fd is_stream buf off len = do
- (l, rc) <- asyncRead fd (if is_stream then 1 else 0)
+ (l, rc) <- asyncRead (fromIntegral fd) (if is_stream then 1 else 0)
(fromIntegral len) (buf `plusPtr` off)
if l == (-1)
then
else return (fromIntegral l)
asyncWriteRawBuffer loc fd is_stream buf off len = do
- (l, rc) <- asyncWriteBA fd (if is_stream then 1 else 0)
+ (l, rc) <- asyncWriteBA (fromIntegral fd) (if is_stream then 1 else 0)
(fromIntegral len) off buf
if l == (-1)
then
else return (fromIntegral l)
asyncWriteRawBufferPtr loc fd is_stream buf off len = do
- (l, rc) <- asyncWrite fd (if is_stream then 1 else 0)
+ (l, rc) <- asyncWrite (fromIntegral fd) (if is_stream then 1 else 0)
(fromIntegral len) (buf `plusPtr` off)
if l == (-1)
then