Safe Haskell | None |
---|
Copper - the Penny parser.
The parse functions in this module only accept lists of files rather than individual files because in order to correctly assign the global serials a single function must be able to see all the transactions, not just the transactions in a single file.
- open :: [String] -> IO [LedgerItem]
- module Penny.Copper.Interface
- data GroupSpec
- = NoGrouping
- | GroupLarge
- | GroupAll
- data GroupSpecs = GroupSpecs {}
- item :: GroupSpecs -> S4 (TopLineCore, Ents PostingCore) PricePoint Comment BlankLine -> Maybe Text
Convenience functions to read and parse files
open :: [String] -> IO [LedgerItem]Source
Reads and parses the given files. If any of the files is -
,
reads standard input. If the list of files is empty, reads standard
input. IO errors are not caught. Parse errors are printed to
standard error and the program will exit with a failure.
Types for things found in ledger files
module Penny.Copper.Interface
Rendering
Specifies how to perform digit grouping when rendering a quantity. All grouping groups into groups of 3 digits.
NoGrouping | Do not perform any digit grouping |
GroupLarge | Group digits, but only if the number to be grouped is greater than 9,999 (if grouping the whole part) or if there are more than 4 decimal places (if grouping the fractional part). |
GroupAll | Group digits whenever there are at least four decimal places. |
item :: GroupSpecs -> S4 (TopLineCore, Ents PostingCore) PricePoint Comment BlankLine -> Maybe TextSource