quiver-csv-0.0.0.2: Quiver combinators for cellular CSV data processing

Copyright© 2015 Patryk Zadarnowski <pat@jantar.org>
LicenseBSD3
Maintainerpat@jantar.org
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Control.Quiver.CSV.Decoder

Description

Streaming CSV file decoder compliant with RFC 4180. It follows the RFC 4180 quite strictly, with the following minor extensions:

  • arbitrary characters, including ASCII control codes and non-ASCII code points are accepted anywhere in the input,
  • CR and LF are accepted as row separators in addition to the standard CR+LF,
  • rows can have varying number of fields,
  • final row is not required to end with CR+LF, and
  • within quoted field, a quote character that is not followed by another quote, comma or line break is accepted literally.

Synopsis

Documentation

decodeCSV :: Functor f => SP ByteString.ByteString (Cell ByteString.ByteString) f CSVError Source

A Quiver processor that parses a fragmented strict representation of a CSV file into a stream of cells.

decodeLazyCSV :: Functor f => SP Lazy.ByteString (Cell Lazy.ByteString) f CSVError Source

A Quiver processor that parses a fragmented lazy representation of a CSV file into a stream of cells.