Copyright | © 2015 Patryk Zadarnowski <pat@jantar.org> |
---|---|
License | BSD3 |
Maintainer | pat@jantar.org |
Stability | experimental |
Portability | portable |
Safe Haskell | Safe |
Language | Haskell2010 |
CSV syntax elements as defined in RFC 4180 and a few miscellaneous Quiver combinators.
- type ParseResult e = Maybe (Maybe e)
- pattern ParseIncomplete :: Maybe t
- pattern ParseComplete :: Maybe (Maybe t)
- pattern ParseFailed :: t -> Maybe (Maybe t)
- data ParseError
- (>:>) :: b -> P a' a b b' f (ParseResult e) -> P a' a b b' f (ParseResult e)
- (*>:>) :: ByteString.ByteString -> P a' a ByteString.ByteString b' f (ParseResult e) -> P a' a ByteString.ByteString b' f (ParseResult e)
- deliverError :: e -> P a' a b b' f (ParseResult e)
- pattern LF :: Word8
- pattern CR :: Word8
- pattern QC :: Word8
- pattern CC :: Word8
- isSpecial :: Word8 -> Bool
- fieldDelimiter :: ByteString.ByteString
- fieldSeparator :: ByteString.ByteString
- recordSeparator :: ByteString.ByteString
- quoteSequence :: ByteString.ByteString
Documentation
type ParseResult e = Maybe (Maybe e) Source
Codec result type.
pattern ParseIncomplete :: Maybe t Source
Codec result value indicating premature termination of the consumer.
pattern ParseComplete :: Maybe (Maybe t) Source
Codec result value indicating successful processing of the entire input stream.
pattern ParseFailed :: t -> Maybe (Maybe t) Source
Codec result value indicating unsuccessful processing of the input stream.
data ParseError Source
Codec error type.
IncompleteCell | Input ends in a partial cell value.
For encoder, this means that the last |
IncompleteRow | Input ends in a partial row value.
For encoder, this means that the last |
(>:>) :: b -> P a' a b b' f (ParseResult e) -> P a' a b b' f (ParseResult e) infixr 1 Source
(*>:>) :: ByteString.ByteString -> P a' a ByteString.ByteString b' f (ParseResult e) -> P a' a ByteString.ByteString b' f (ParseResult e) infixr 1 Source
deliverError :: e -> P a' a b b' f (ParseResult e) Source
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.)