ouroboros-consensus-cardano-0.16.0.0: The instantation of the Ouroboros consensus layer used by Cardano
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.Tools.DBAnalyser.CSV

Description

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.

Documentation

newtype Separator Source #

Constructors

Separator 

Fields

Instances

Instances details
IsString Separator Source # 
Instance details

Defined in Cardano.Tools.DBAnalyser.CSV

Methods

fromStringStringSeparator #

Monoid Separator Source # 
Instance details

Defined in Cardano.Tools.DBAnalyser.CSV

Semigroup Separator Source # 
Instance details

Defined in Cardano.Tools.DBAnalyser.CSV

Show Separator Source # 
Instance details

Defined in Cardano.Tools.DBAnalyser.CSV

Methods

showsPrecIntSeparatorShowS #

showSeparatorString #

showList ∷ [Separator] → ShowS #

computeAndWriteLineHandleSeparator → [(a, b → IO Builder)] → b → IO () Source #

computeAndWriteLinePureHandleSeparator → [(a, b → Builder)] → b → IO () Source #

computeColumns ∷ [a → IO Builder] → a → IO [Builder] Source #

computeColumnsPure ∷ [a → Builder] → a → [Builder] Source #

writeHeaderLineHandleSeparator → [(Builder, a)] → IO () Source #

writeLineHandleSeparator → [Builder] → IO () Source #