Safe Haskell | Safe-Infered |
---|
Amount parsers. An amount is a commodity and a quantity. (An entry is an amount and a debit or credit).
Possible combinations:
- quoted Level 1 commodity, optional whitespace, quantity
- Level 3 commodity, optional whitespace, quantity
- Quantity, optional whitespace, quoted Level 1 commodity
- Quantity, optional whitespace, Level 2 commodity
Each quantity may be quoted or unquoted.
Documentation
amount :: RadGroup -> Parser (Amount, Format)Source
Parses an amount with its metadata. Handles all combinations of commodities and quantities.
:: (GroupingSpec, GroupingSpec) | Grouping |
-> RadGroup | |
-> Format | |
-> Amount | |
-> Maybe Text |
Render an Amount. The Format is required so that the commodity can be displayed in the right place.