module QuantLib.Currency
        ( module QuantLib.Currency
        )
        where

-- | Currency specification
data Currency = Currency {
        -- | currency name, e.g. "U.S. dollar"
        Currency -> String
cName           :: String,
        -- | ISO 4217 three-letter code, e.g. "USD"
        Currency -> String
cCode           :: String,
        -- | ISO 4217 numeric code, e.g. 840
        Currency -> Integer
cIsoCode        :: Integer,
        -- | number of fractionary parts in a unit
        Currency -> Integer
cFracsPerUnit   :: Integer
        } deriving (Currency -> Currency -> Bool
(Currency -> Currency -> Bool)
-> (Currency -> Currency -> Bool) -> Eq Currency
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Currency -> Currency -> Bool
$c/= :: Currency -> Currency -> Bool
== :: Currency -> Currency -> Bool
$c== :: Currency -> Currency -> Bool
Eq)

instance Show Currency where
        showsPrec :: Int -> Currency -> ShowS
showsPrec Int
_ Currency
x String
s = Currency -> String
cCode Currency
x String -> ShowS
forall a. [a] -> [a] -> [a]
++ String
s