repa-array-4.1.0.1: Bulk array representations and operators.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Array.Auto.IO

Contents

Description

Array IO

Synopsis

Raw Array IO

hGetArray :: Handle -> Int -> IO (Array Word8) Source

Get data from a file, up to the given number of bytes.

hGetArrayPre :: Handle -> Int -> Array Word8 -> IO (Array Word8) Source

Get data from a file, up to the given number of bytes, also copying the given data to the front of the new buffer.

hPutArray :: Handle -> Array Word8 -> IO () Source

Write data into a file.

XSV files

Reading

getArrayFromXSV Source

Arguments

:: Char

Field separator character, eg '|', ',' or '\t'.

-> FilePath

Source file handle.

-> IO (Array (Array (Array Char))) 

Read a XSV file as a nested array. We get an array of rows:fields:characters.

hGetArrayFromXSV Source

Arguments

:: Char

Field separator character, eg '|', ',' or '\t'.

-> Handle

Source file handle.

-> IO (Array (Array (Array Char))) 

Read an XSV file as a nested array. We get an array of rows:fields:characters.

Writing

putArrayAsXSV Source

Arguments

:: Char

Separator character, eg '|', ',' or '\t'

-> FilePath

Source file handle.

-> Array (Array (Array Char))

Array of row, field, character.

-> IO () 

Write a nested array as an XSV file.

The array contains rows:fields:characters.

hPutArrayAsXSV Source

Arguments

:: Char

Separator character, eg '|', ',' or '\t'

-> Handle

Source file handle.

-> Array (Array (Array Char))

Array of row, field, character.

-> IO () 

Write a nested array as an XSV file.

The array contains rows:fields:characters.