hledger-lib-1.3: Core data types, parsers and functionality for the hledger accounting tools

Safe Haskell | None
Language | Haskell2010

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 `Amount`s of the commodity - is the symbol on the left or right, are thousands separated by comma, significant decimal places and so on.

Synopsis

- nonsimplecommoditychars :: [Char]
- quoteCommoditySymbolIfNeeded :: Text -> Text
- commodity :: [Char]
- commoditysymbols :: [(String, CommoditySymbol)]
- comm :: String -> CommoditySymbol
- conversionRate :: CommoditySymbol -> CommoditySymbol -> Double
- tests_Hledger_Data_Commodity :: Test

# Documentation

nonsimplecommoditychars :: [Char] #

quoteCommoditySymbolIfNeeded :: Text -> Text #

commodity :: [Char] #

commoditysymbols :: [(String, CommoditySymbol)] #

comm :: String -> CommoditySymbol #

Look up one of the sample commodities' symbol by name.

conversionRate :: CommoditySymbol -> CommoditySymbol -> Double #

Find the conversion rate between two commodities. Currently returns 1.

tests_Hledger_Data_Commodity :: Test #