Syntax-preserving CSV manipulation

Latest on Hackage:0.1

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

BSD-3-Clause licensed by George Wilson
Maintained by

svfactor is a library for parsing, manipulating, and printing CSV and similar formats (such as PSV, TSV, and many more).

svfactor retains all syntactic information including newlines, and provides lenses, prisms, and traversals to query and manipulate this structure. This should make it useful for writing custom CSV transformations and sanitisation tools. For example, one could easily use it to rewrite all CRLF newlines to LF. It also extends RFC4180 by allowing optional spacing surrounding fields.

svfactor's parser is exposed so you can use it independently and printing is similarly standalone.

Please note that there are known performance problems with svfactor.


  • Handling multiple logical documents in one file: Concat.hs

  • Fixing inconsistent formatting with lenses: Requote.hs

comments powered byDisqus