hledger-lib-0.14: Reusable types and utilities for the hledger accounting tool and financial apps in general.Source codeContentsIndex
Hledger.Data.Commodity
Description
A Commodity is a symbol representing a currency or some other kind of thing we are tracking, and some display preferences that tell how to display Amounts of the commodity - is the symbol on the left or right, are thousands separated by comma, significant decimal places and so on.
Synopsis
comm :: String -> Commodity
conversionRate :: Commodity -> Commodity -> Double
canonicaliseCommodities :: [Commodity] -> Map String Commodity
Documentation
comm :: String -> CommoditySource
Look up one of the hard-coded default commodities. For use in tests.
conversionRate :: Commodity -> Commodity -> DoubleSource
Find the conversion rate between two commodities. Currently returns 1.
canonicaliseCommodities :: [Commodity] -> Map String CommoditySource
Convert a list of commodities to a map from commodity symbols to unique, display-preference-canonicalised commodities.
Produced by Haddock version 2.6.1