penny-lib-0.4.0.0: Extensible double-entry accounting system - library

Safe HaskellSafe-Infered

Penny.Cabin.Balance.Tree

Description

Takes postings and places them into a tree for further processing.

Steps:

  • 1. [LT.PostingInfo] -> [PriceConverted]
  • 2. [PriceConverted] -> FlatMap
  • 3. FlatMap -> RawBals
  • 4. RawBals -> (SummedBals, TotalBal)
  • 5. (SummedBals, TotalBal) -> (SummedWithIsEven, TotalBal)
  • 6. (SummedWithIsEven, TotalBal) -> (PreSpecMap, TotalBal)
  • 7. (PreSpecMap, TotalBal) -> [Columns PreSpec]
  • 8. [Columns PreSpec] -> [Columns R.ColumnSpec] (strict)
  • 9. [Columns R.ColumnSpec] -> [[Chunk.Bit]] (lazy)

Synopsis

Documentation

nullConvert :: [Box LibertyMeta] -> PriceConvertedsSource

Makes PriceConverteds where there is no target commodity.

converter :: (Commodity, DateTime) -> [PricePoint] -> [Box LibertyMeta] -> Exceptional Text PriceConvertedsSource

Makes PriceConverteds where commodities will have to be changed to a target commodity. This will fail if necessary price data is lacking.