eurofxref 0.2.0 → 0.2.1
raw patch · 3 files changed
+10/−6 lines, 3 filesdep ~bytestringdep ~http-conduitPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: bytestring, http-conduit
API changes (from Hackage documentation)
Files
- Financial/CurrencyRates.hs +2/−2
- Financial/EuroFXRef.hs +1/−1
- eurofxref.cabal +7/−3
Financial/CurrencyRates.hs view
@@ -14,8 +14,8 @@ raRates :: Map Currency a -- ^ Value of one unit of the reference currency in each currency } --- | Re-base the rates to a more dependable reference currency, such as the New--- Zealand dollar.+-- | Re-base the rates to a different reference currency, such that the new rates give+-- the value of one unit of that currency. rebase :: Fractional a => Currency -> Rates a -> Rates a rebase new (Rates old t m) = Rates new t $ case new `M.lookup` m of Just newRate -> M.map (/newRate) . M.insert old 1 $ m
Financial/EuroFXRef.hs view
@@ -1,6 +1,6 @@ {-# LANGUAGE DeriveDataTypeable, FlexibleContexts #-} -- | Example using ghci, where we read the currency rates relative to Euros, and re-base--- them to hard currency.+-- them to New Zealand dollars. -- -- > > :m Financial.EuroFXRef Data.Map -- > > fmap (assocs . raRates . rebase (Currency "NZD")) fetch :: IO [(Currency, Double)]
eurofxref.cabal view
@@ -1,5 +1,5 @@ name: eurofxref-version: 0.2.0+version: 0.2.1 cabal-version: >=1.6 build-type: Simple license: BSD3@@ -19,15 +19,19 @@ author: Stephen Blackheath data-files: example.hs +source-repository head+ type: git+ location: https://github.com/the-real-blackh/eurofxref+ Library build-depends: base >=4 && <5,- bytestring == 0.9.*,+ bytestring >= 0.9.0.0 && < 0.11.0.0, containers >= 0.2 && < 0.6, failure >= 0.1, monad-control == 0.3.*, conduit == 0.5.*,- http-conduit == 1.5.*,+ http-conduit >= 1.5.0.0 && < 1.9.0.0, http-types >= 0.6.0 && < 0.8.0, hexpat >= 0.20.0 && < 0.21, mtl >= 2.0.0.0 && < 2.2.0.0,