sv-0.1: Encode and decode separated values (CSV, PSV, ...)

Copyright(C) CSIRO 2017-2018
LicenseBSD3
MaintainerGeorge Wilson <george.wilson@data61.csiro.au>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Data.Sv.Parse.Internal

Description

This module contains internal implementation details of sv's parser. As the Internal name suggests, this file is exempt from the PVP. Depend on this module at your own risk!

Synopsis

Documentation

separatedValues :: CharParsing m => ParseOptions s -> m (Sv s) Source #

Parse an Sv

header :: CharParsing m => ParseOptions s -> m (Maybe (Header s)) Source #

Maybe parse the header row of a CSV file, depending on the given Headedness

field :: CharParsing m => Separator -> (String -> s) -> m (Field s) Source #

Parse a field, be it quoted or unquoted

singleQuotedField :: CharParsing m => (String -> s) -> m (Field s) Source #

Parse a field surrounded by single quotes

doubleQuotedField :: CharParsing m => (String -> s) -> m (Field s) Source #

Parse a field surrounded by double quotes

unquotedField :: CharParsing m => Separator -> (String -> s) -> m (Field s) Source #

Parse a field that is not surrounded by quotes

spaced :: CharParsing m => Separator -> m a -> m (Spaced a) Source #

Combinator to parse some data surrounded by spaces

spacedField :: CharParsing m => Separator -> (String -> s) -> m (Spaced (Field s)) Source #

Parse a field with its surrounding spacing

record :: CharParsing m => ParseOptions s -> m (Record s) Source #

Parse an entire record, or "row"

records :: CharParsing m => ParseOptions s -> m (Records s) Source #

Parse many records, or "rows"

ending :: CharParsing m => ParseOptions s -> m [Newline] Source #

Parse zero or many newlines