pipes-key-value-csv-0.4.0.3: Streaming processing of CSV files preceded by key-value pairs.

Copyright(c) Marcin Mrotek 2015
LicenseBSD3
Maintainermarcin.jan.mrotek@gmail.com
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Pipes.KeyValueCsv.Internal.Csv

Description

Helper classes and functions.

Synopsis

Documentation

parseLine :: forall (m :: * -> *) (f :: k -> *) (rs :: [k]) (r :: *). (Monad m, Given Delimiter) => Rec (CellParser m f) rs -> Line m r -> Producer (Rec (WithCsvError :. f) rs) m r Source #

Parse a single row from a stream of text, discard the remaining characters.

parseCells Source #

Arguments

:: forall (m :: * -> *) (f :: k -> *) (rs :: [k]) (x :: *). Monad m 
=> Rec (CellParser m f) rs

Parser record.

-> Cells m x

Stream of cells.

-> Producer (Rec (WithCsvError :. f) rs) m x 

Parse a row of cells and pack it into a one-shot Producer.

buildFromCells Source #

Arguments

:: Monad m 
=> Rec (CellParser m f) (r ': rs)

Parser record.

-> Cells m x

Stream of cells.

-> m (Rec (WithCsvError :. f) rs -> Rec (WithCsvError :. f) (r ': rs), Cells m x) 

A helper function for the FromCells type class. Build a Rec incrementally from Cells.

fromCells Source #

Arguments

:: Monad m 
=> Rec (CellParser m f) rs

Parser record.

-> Cells m x

Stream of cells.

-> m (Rec (WithCsvError :. f) rs, x) 

Parse a row of cells. For more information about parsing with Pipes, see Pipes.Parse.Tutorial.