@@ -15,11 +15,17 @@ import Data.Proxy
15import GHC.Generics
15import GHC.Generics
16import GHC.TypeLits
16import GHC.TypeLits
18+-- | Money type. This is actually 'Centi' from 'Data.Fixed' in disguise.
19+-- The type parameter is phantom, you probably want to use 'Currency' there.
20+-- See also 'Data.Money.Currencies' for currency types.
18newtype Money curr = Money { getAmount :: Centi }
21newtype Money curr = Money { getAmount :: Centi }
19 deriving (Eq, Ord, Generic)
22 deriving (Eq, Ord, Generic)
24+-- | Empty type, used only to carry its type parameter with a currency code around. E.g. 'Currency "USD"', 'Currency "GBP"', et cetera.
25+-- See Data.Money.Currencies for pre-defined currency types.
21data Currency (name :: Symbol)
26data Currency (name :: Symbol)
28+-- | Statically known currency type class.
23class KnownCurrency c where
29class KnownCurrency c where
24 currencyCode :: String
30 currencyCode :: String