packages feed

currency-codes 3.0.0.0 → 3.0.0.1

raw patch · 4 files changed

+14/−17 lines, 4 files

Files

LICENSE view
@@ -1,6 +1,6 @@ MIT License -Copyright (c) 2017 Chordify+Copyright (c) 2017-2018 Chordify  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal
README.md view
@@ -5,28 +5,24 @@ This package mainly provides 2 data types to represent and manipulate currencies according to the [ISO 4217](https://www.iso.org/iso-4217-currency-codes.html) standard.  -It also provides a handful of instances for common typeclasses (`Show`, `Read`, `Random`, `ToJSON`,-`FromJSON`, `Val`, `ToSchema`). +It also provides a handful of instances for common typeclasses (`Show`, `Read`, `Random`, `ToJSON`, `FromJSON`, `Val`, `Data`, `Typeable`, `Generic`, `NFData`).   ## Example -```haskell+```hs import           Data.Aeson     (ToJSON(..))-import qualified Data.Aeson     as Aeson-import           Data.Currency  (Currency, Alpha)-import qualified Data.Currency  as Currency+import           Data.Currency  (Currency, Alpha(..)) import           GHC.Generics   (Generic) import qualified Safe+import qualified Data.Aeson     as Aeson+import qualified Data.Currency  as Currency   myCurrencies :: [Currency] myCurrencies =-  [Currency.eur, Currency.usdDollar]--fromAlpha :: Alpha -> [Currency] -> Maybe Currency-fromAlpha α =-  Safe.headMay . filter ((==) α . Currency.alpha)-+  [ Currency.fromAlpha EUR+  , Currency.fromAlpha USD+  ]  data Transaction = Transaction   { amount   :: Integer@@ -40,4 +36,4 @@  ## License -[MIT © 2017 Chordify](https://gitlab.com/chordify/currency-codes/blob/master/LICENSE)+[MIT © 2017-2018 Chordify](https://gitlab.com/chordify/currency-codes/blob/master/LICENSE)
currency-codes.cabal view
@@ -1,12 +1,12 @@ name:                currency-codes-version:             3.0.0.0+version:             3.0.0.1 synopsis:            ISO-4217 Currency Codes description:         ISO-4217 Currency Codes license:             MIT license-file:        LICENSE author:              Chordify maintainer:          Matthias Benkort <matthias.benkort@gmail.com>-copyright:           (c) 2017 Chordify+copyright:           (c) 2017-2018 Chordify category:            Data build-type:          Simple homepage:            https://github.com/chordify/currency-codes
src/Data/Currency.hs view
@@ -1,8 +1,9 @@ -- | A Currency representation as specified in the ISO-4217 standard  module Data.Currency+  (   -- * Types-  ( Currency(..)+  Currency(..)   , Alpha(..)   , currencies