Maintainer's Corner

Readme for csv-enumerator

Readme for csv-enumerator-0.9.3

README

CSV Files and Haskell

CSV files are the de-facto standard in many cases of data transfer,
particularly when dealing with enterprise application or disparate database
systems.

While there are a number of csv libraries in Haskell, at the time of this
project's start in 2010, there wasn't one that provided all of the following:

Full flexibility in quote characters, separators, input/output

Constant space operation

Robust parsing and error resiliency

Fast operation

Convenient interface that supports a variety of use cases

This library is an attempt to close these gaps.

This package

csv-enumerator is an enumerator-based CSV parsing library that is easy to use,
flexible and fast. Furthermore, it provides ways to use constant-space during
operation, which is absolutely critical in many real world use cases.

Introduction

ByteStrings are used for everything

There are 2 basic row types and they implement exactly the same operations,
so you can chose the right one for the job at hand:

type MapRow = Map ByteString ByteString

type Row = [ByteString]

Folding over a CSV file can be thought of as the most basic operation.

Higher level convenience functions are provided to "map" over CSV files,
modifying and transforming them along the way.

Helpers are provided for simple input/output of CSV files for simple use
cases.

For extreme / advanced use cases, the user can drop down to the
Enumerator/Iteratee level and do interleaved IO among other things.

API Docs

The API is quite well documented and I would encourage you to keep it handy.

Speed

While fast operation is of concern, I have so far cared more about correct
operation and a flexible API. Please let me know if you notice any performance
regressions or optimization opportunities.