pipes-cellular-csv-1.0.0.0: Efficient pipes-based cellular CSV codec

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

Pipes.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,
  • within quoted field, a quote character that is not followed by another quote, comma or line break is accepted literally.

Synopsis

Documentation

decodeCSV :: Monad m => Pipe ByteString.ByteString (Cell ByteString.ByteString) m () Source

An infinite pipe that parses a fragmented strict representation of of a CSV file into a stream of cells.

decodeLazyCSV :: Monad m => Pipe Lazy.ByteString (Cell ByteString.ByteString) m () Source

An infinite pipe that parses a fragmented lazy representation of of a CSV file into a stream of cells.