Safe Haskell | None |
---|---|
Language | Haskell2010 |
- text :: Siphon Text
- encodeRow :: Vector (Escaped Text) -> Text
- escape :: Text -> Escaped Text
- escapeAlways :: Text -> Escaped Text
- sepByDelim1' :: Parser a -> Char -> Parser [a]
- sepByEndOfLine1' :: Parser a -> Parser [a]
- row :: Char -> Parser (Vector Text)
- rowNoNewline :: Char -> Parser (Vector Text)
- field :: Char -> Parser Text
- escapedField :: Parser Text
- escapedFieldInner :: Builder -> Parser Builder
- unescapedField :: Char -> Parser Text
- dquote :: Parser Char
- unescape :: Parser Text
- (<$!>) :: Monad m => (a -> b) -> m a -> m b
- liftM2' :: Monad m => (a -> b -> c) -> m a -> m b -> m c
- endOfLine :: Parser ()
- textDoubleQuote :: Text
- doubleQuote :: Char
- newline :: Char
- cr :: Char
- comma :: Char
Documentation
escapeAlways :: Text -> Escaped Text Source
This implementation is definitely suboptimal. A better option (which would waste a little space but would be much faster) would be to build the new text by writing to a buffer directly.
Specialized version of sepBy1'
which is faster due to not
accepting an arbitrary separator.
sepByEndOfLine1' :: Parser a -> Parser [a] Source
Specialized version of sepBy1'
which is faster due to not
accepting an arbitrary separator.
Parse a record, not including the terminating line separator. The
terminating line separate is not included as the last record in a
CSV file is allowed to not have a terminating line separator. You
most likely want to use the endOfLine
parser in combination with
this parser.
field :: Char -> Parser Text Source
Parse a field. The field may be in either the escaped or non-escaped format. The return value is unescaped.
unescapedField :: Char -> Parser Text Source
liftM2' :: Monad m => (a -> b -> c) -> m a -> m b -> m c Source
A version of liftM2
that is strict in the result of its first
action.
Match either a single newline character '\n'
, or a carriage
return followed by a newline character "\r\n"
, or a single
carriage return '\r'
.