packages feed

safe-money 0.8.1 → 0.9

raw patch · 3 files changed

+16/−5 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Money: type family ErrScaleNonCanonical (currency :: Symbol) :: k

Files

changelog.md view
@@ -1,3 +1,14 @@+# Version 0.9++* _BREAKING CHANGE, POSSIBLY REQUIRING HUMAN INTERVENTION_. Changed+  `UnitScale "BSD" "cent"` from `(1, 1)` to `(100, 1)`, changed+  `UnitScale "HTG" "centime"` from `(1, 1)` to `(100, 1)`, changed+  `UnitScale "MDL" "leu"` from `(100, 1)` to `(1, 1)`, and changed+  `UnitScale "SBD" "dollar"` from `(100, 1)` to `(1, 1)`.  The scales in+  question were wrong before. If you relied on these specific scales,+  for example, for serializing and storing amounts in a database, you+  will need to rescale your amounts.+ # Version 0.8.1  * Fix decimal rendering of some small cent values (e.g., `0.02`). See issue #45.
safe-money.cabal view
@@ -1,5 +1,5 @@ name: safe-money-version: 0.8.1+version: 0.9 license: BSD3 license-file: LICENSE copyright: Copyright (c) Renzo Carbonara 2016-2019
src/Money.hs view
@@ -217,7 +217,7 @@ -- | Bahamian dollar type instance I.CurrencyScale "BSD" = I.UnitScale "BSD" "cent" type instance I.UnitScale "BSD" "dollar" = '(1, 1)-type instance I.UnitScale "BSD" "cent" = '(1, 1)+type instance I.UnitScale "BSD" "cent" = '(100, 1) -- | Bhutanese ngultrum type instance I.CurrencyScale "BTN" = I.UnitScale "BTN" "chetrum" type instance I.UnitScale "BTN" "ngultrum" = '(1, 1)@@ -377,7 +377,7 @@ -- | Haitian gourde type instance I.CurrencyScale "HTG" = I.UnitScale "HTG" "centime" type instance I.UnitScale "HTG" "gourde" = '(1, 1)-type instance I.UnitScale "HTG" "centime" = '(1, 1)+type instance I.UnitScale "HTG" "centime" = '(100, 1) -- | Hungarian forint type instance I.CurrencyScale "HUF" = I.UnitScale "HUF" "filler" type instance I.UnitScale "HUF" "forint" = '(1, 1)@@ -484,7 +484,7 @@ type instance I.UnitScale "MAD" "centime" = '(100, 1) -- | Moldovan leu type instance I.CurrencyScale "MDL" = I.UnitScale "MDL" "ban"-type instance I.UnitScale "MDL" "leu" = '(100, 1)+type instance I.UnitScale "MDL" "leu" = '(1, 1) type instance I.UnitScale "MDL" "ban" = '(100, 1) -- | Malagasy ariary type instance I.CurrencyScale "MGA" = I.UnitScale "MGA" "iraimbilanja"@@ -618,7 +618,7 @@ type instance I.UnitScale "SAR" "halala" = '(100, 1) -- | Solomon Islands dollar type instance I.CurrencyScale "SBD" = I.UnitScale "SBD" "cent"-type instance I.UnitScale "SBD" "dollar" = '(100, 1)+type instance I.UnitScale "SBD" "dollar" = '(1, 1) type instance I.UnitScale "SBD" "cent" = '(100, 1) -- | Seychellois rupee type instance I.CurrencyScale "SCR" = I.UnitScale "SCR" "cent"