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.Extras

Description

CSV syntax elements as defined in RFC 4180 and a few miscellaneous Quiver combinators.

Synopsis

Documentation

data CSVError Source

Codec error type.

Constructors

IncompleteCell

Input ends in a partial cell value. For encoder, this means that the last Cell of the input stream specifies the EOP delimiter instead of EOR or EOT. For decoder, this means that the last cell of the input stream is missing the closing quote character.

IncompleteRow

Input ends in a partial row value. For encoder, this means that the last Cell of the input stream specifies the EOC delimiter instead of EOR or EOT. For decoder, this means that the last row of the input stream is missing the line break sequence.

(*>:>) :: ByteString.ByteString -> P a' a ByteString.ByteString b' f (SPResult e) -> P a' a ByteString.ByteString b' f (SPResult e) infixr 5 Source

Emits a bytestring, filtering out the empty ones.

deliverError :: e -> P a' a b b' f (SPResult e) Source

Delivers a simple stream processor failure.

pattern LF :: Word8 Source

line byte value

pattern CR :: Word8 Source

carriage return byte value

pattern QC :: Word8 Source

quote character byte value

pattern CC :: Word8 Source

comma character byte value

isSpecial :: Word8 -> Bool Source

Identifies special byte values, which should never appear within unquoted CSV fields.

fieldDelimiter :: ByteString.ByteString Source

The field delimiter string (a quote character.)

fieldSeparator :: ByteString.ByteString Source

The field separator string (a comma character.)

recordSeparator :: ByteString.ByteString Source

The field separator (CR+LF byte sequence.)

quoteSequence :: ByteString.ByteString Source

An escaped quote string (double quote character.)