ArrayRef-0.1.2: Unboxed references, dynamic arrays and moreSource codeContentsIndex
Data.ArrayBZ.IO
PortabilityHugs/GHC
Stabilityexperimental
MaintainerBulat Ziganshin <Bulat.Ziganshin@gmail.com>
Contents
IO arrays with boxed elements
IO arrays with unboxed elements
Overloaded mutable array interface
Doing I/O with IOUArrays
Description
Mutable boxed and unboxed arrays in the IO monad.
Synopsis
type IOArray = IOSpecific3 BoxedMutableArray
type IOUArray = IOSpecific3 UnboxedMutableArray
castIOUArray :: forall i e e'. (Ix i, Enum i, Unboxed e, Unboxed e') => IOUArray i e -> IOUArray i e'
module Data.ArrayBZ.MArray
hGetArray :: Handle -> IOUArray Int Word8 -> Int -> IO Int
hPutArray :: Handle -> IOUArray Int Word8 -> Int -> IO ()
IO arrays with boxed elements
type IOArray = IOSpecific3 BoxedMutableArraySource
Boxed mutable arrays in IO monad
IO arrays with unboxed elements
type IOUArray = IOSpecific3 UnboxedMutableArraySource
Unboxed mutable arrays in IO monad
castIOUArray :: forall i e e'. (Ix i, Enum i, Unboxed e, Unboxed e') => IOUArray i e -> IOUArray i e'Source
Casts an IOUArray with one element type into IOUArray with a different element type (upper bound is recalculated).
Overloaded mutable array interface
module Data.ArrayBZ.MArray
Doing I/O with IOUArrays
hGetArraySource
:: HandleHandle to read from
-> IOUArray Int Word8Array in which to place the values
-> IntNumber of Word8s to read
-> IO IntReturns: the number of Word8s actually read, which might be smaller than the number requested if the end of file was reached.
Reads a number of Word8s from the specified Handle directly into an array.
hPutArraySource
:: HandleHandle to write to
-> IOUArray Int Word8Array to write from
-> IntNumber of Word8s to write
-> IO ()
Writes an array of Word8 to the specified Handle.
Produced by Haddock version 2.1.0