cassava-0.4.3.0: A CSV parsing and encoding library

Safe HaskellNone
LanguageHaskell98

Data.Csv.Builder

Contents

Description

Low-level bytestring builders. Most users want to use the more type-safe Incremental module instead.

Synopsis

Encoding single records and headers

encodeHeader :: Header -> Builder Source

Encode a header.

encodeRecord :: ToRecord a => a -> Builder Source

Encode a single record.

encodeNamedRecord :: ToNamedRecord a => Header -> a -> Builder Source

Encode a single named record, given the field order.

encodeDefaultOrderedNamedRecord :: (DefaultOrdered a, ToNamedRecord a) => a -> Builder Source

Encode a single named record, using the default field order.

Encoding options

encodeHeaderWith :: EncodeOptions -> Header -> Builder Source

Like encodeHeader, but lets you customize how the CSV data is encoded.

encodeRecordWith :: ToRecord a => EncodeOptions -> a -> Builder Source

Like encodeRecord, but lets you customize how the CSV data is encoded.

encodeNamedRecordWith :: ToNamedRecord a => EncodeOptions -> Header -> a -> Builder Source

Like encodeNamedRecord, but lets you customize how the CSV data is encoded.

encodeDefaultOrderedNamedRecordWith :: forall a. (DefaultOrdered a, ToNamedRecord a) => EncodeOptions -> a -> Builder Source

Like encodeDefaultOrderedNamedRecord, but lets you customize how the CSV data is encoded.