Safe Haskell | Safe |
---|---|
Language | Haskell2010 |
Operations upon monetary Amount
s
Converting amounts
>>>
convert USD (Amount EUR 23482.34)
Amount USD 27709.1612
>>>
prettyPrint $ convert USD (Amount EUR 23482.34)
"USD 27,709.16"
Comparing amounts
>>>
compareAmounts (Amount EUR 1000) (Amount BTC 1)
LT
- data Amount c = Amount c Double
- toUSD :: Currency c => Amount c -> Amount USD
- fromUSD :: Currency c => c -> Amount USD -> Amount c
- convert :: (Currency c', Currency c) => c' -> Amount c -> Amount c'
- compareAmounts :: (Currency c1, Currency c2) => Amount c1 -> Amount c2 -> Ordering
- module Data.Currency.Currencies
Monetary Amount
Monetary amounts
Converting
Comparing
compareAmounts :: (Currency c1, Currency c2) => Amount c1 -> Amount c2 -> Ordering Source #
Compare two Amount
s of arbitrary currencies
module Data.Currency.Currencies