Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module provides functionality for helping writing data values as CSV entries.
A couple of 'db-analyzer` analysis produce CSV files, which contain the analysis' results. A way to populate these files is to write the headers first, and then, line by line, write the rows that contain the data. Each column in a row containing data must correspond to a given header. To make it easier to maintain this correspondence between headers and data, we usually specify a CSV builder as:
[(Builder, a -> IO Builder)]
where each first component of each tuple in the list represents a header, and each second component determines how the value that corresponds to that header is computed, given a certain value that is needed to compute a row in the resulting CSV.
We use Builder
to efficiently intercalate values with the CSV Separator
.