Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Hledger.Read.CsvReader
Contents
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 = Text
- csvFileFor :: FilePath -> FilePath
- rulesFileFor :: FilePath -> FilePath
- parseRulesFile :: FilePath -> ExceptT String IO CsvRules
- printCSV :: CSV -> Text
- tests_CsvReader :: TestTree
Reader
Misc.
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.