repa-flow-4.0.0.2: Data-parallel data flows.

Safe HaskellNone
LanguageHaskell98

Data.Repa.Flow.Default.SizedIO

Contents

Description

Read and write files.

Synopsis

Documentation

Sourcing

sourceBytes :: BulkI l Bucket => Integer -> Array l Bucket -> IO (Sources F Word8) Source

Like sourceBytes, but with the default chunk size.

sourceChars :: BulkI l Bucket => Integer -> Array l Bucket -> IO (Sources F Char) Source

Like sourceChars, but with the default chunk size.

sourceLines Source

Arguments

:: BulkI l Bucket 
=> Integer

Size of chunk to read in bytes.

-> IO ()

Action to perform if we can't get a whole record.

-> Array l Bucket

Buckets.

-> IO (Sources N (Array F Char)) 

Like sourceLines, but with the default chunk size and error action.

sourceRecords Source

Arguments

:: BulkI l Bucket 
=> Integer

Size of chunk to read in bytes.

-> (Word8 -> Bool)

Detect the end of a record.

-> IO ()

Action to perform if we can't get a whole record.

-> Array l Bucket

File handles.

-> IO (Sources N (Array F Word8)) 

Like sourceRecords, but with the default chunk size and error action.

sourceTSV :: BulkI l Bucket => Integer -> IO () -> Array l Bucket -> IO (Sources N (Array N (Array F Char))) Source

Read a file containing Tab-Separated-Values.

sourceCSV :: BulkI l Bucket => Integer -> IO () -> Array l Bucket -> IO (Sources N (Array N (Array F Char))) Source

Read a file containing Tab-Separated-Values.

TODO: handle escaped commas. TODO: check CSV file standard.

Sinking

sinkLines Source

Arguments

:: (BulkI l Bucket, BulkI l1 (Array l2 Char), BulkI l2 Char, Unpack (Array l2 Char) t2) 
=> Name l1

Layout for chunks of lines.

-> Name l2

Layout for lines.

-> Array l Bucket

Buckets

-> IO (Sinks l1 (Array l2 Char)) 

An alias for sinkLines.