svfactor-0.1: Syntax-preserving CSV manipulation

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

Data.Svfactor.Parse.Options

Description

Configuration to tell the parser what your file looks like.

Synopsis

Documentation

data ParseOptions s Source #

An ParseOptions informs the parser how to parse your file. The type parameter will be some sort of string; often ByteString.

A default is provided as defaultParseOptions, seen below.

Constructors

ParseOptions 

Fields

class (HasSeparator s, HasHeadedness s) => HasParseOptions s t a b | s -> a, t -> b, s b -> t, t a -> s where Source #

Classy lenses for ParseOptions

Minimal complete definition

parseOptions

Methods

parseOptions :: Lens s t (ParseOptions a) (ParseOptions b) Source #

encodeString :: Lens s t (String -> a) (String -> b) Source #

endOnBlankLine :: s ~ t => Lens s t Bool Bool Source #

endOnBlankLine :: (s ~ t, a ~ b) => Lens s t Bool Bool Source #

class HasSeparator c where Source #

Classy lens for Separator

Minimal complete definition

separator

class HasHeadedness c where Source #

Classy lens for Headedness

Minimal complete definition

headedness

defaultParseOptions :: ParseOptions ByteString Source #

defaultParseOptions is used to parse a CSV file featuring a header row, using Trifecta as the parsing library. It uses UTF-8 ByteStrings

defaultHeadedness :: Headedness Source #

The default is that a header is present.

defaultSeparator :: Separator Source #

The default separator. Alias for comma.