hledger-lib-1.19.1: A reusable library providing the core functionality of hledger

Safe Haskell | None
Language | Haskell2010

Hledger.Read.CsvReader

Contents

- Reader
- Misc.
- Tests
- Orphan instances

Description

A reader for CSV data, using an extra rules file to help interpret the data.

Synopsis

- reader :: MonadIO m => Reader m
- type CSV = [CsvRecord]
- type CsvRecord = [CsvValue]
- type CsvValue = String
- csvFileFor :: FilePath -> FilePath
- rulesFileFor :: FilePath -> FilePath
- parseRulesFile :: FilePath -> ExceptT String IO CsvRules
- printCSV :: CSV -> String
- tests_CsvReader :: TestTree

# Reader

reader :: MonadIO m => Reader m Source #

# Misc.

type CSV = [CsvRecord] Source #

type CsvRecord = [CsvValue] Source #

type CsvValue = String Source #

csvFileFor :: FilePath -> FilePath Source #

Given a CSV rules file path, what would normally be the corresponding CSV file ?

rulesFileFor :: FilePath -> FilePath Source #

Given a CSV file path, what would normally be the corresponding rules file ?

parseRulesFile :: FilePath -> ExceptT String IO CsvRules Source #

An pure-exception-throwing IO action that parses this file's content as CSV conversion rules, interpolating any included files first, and runs some extra validation checks.

printCSV :: CSV -> String Source #

# Tests

tests_CsvReader :: TestTree Source #

# Orphan instances

ShowErrorComponent String Source # |
Instance details Methods showErrorComponent :: String -> String Source # errorComponentLen :: String -> Int Source #