Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include historical currency codes #3

Open
jbransen opened this issue Mar 2, 2018 · 3 comments · May be fixed by #5
Open

Include historical currency codes #3

jbransen opened this issue Mar 2, 2018 · 3 comments · May be fixed by #5

Comments

@jbransen
Copy link
Collaborator

jbransen commented Mar 2, 2018

Currently the package includes only 'active' currencies, but ISO 4217 used to contain other codes as well (i.e. BYR, which was removed in 2016), which we still may want to parse and/or represent in systems dealing with old payment information. It would be nice to include those as well, maybe with some sort of checking function stating that it is outdated.

@KtorZ
Copy link
Collaborator

KtorZ commented Mar 2, 2018

This information could be encoded in the type representation itself ?

-- | Actual representation of a currency
data Currency = Currency
  { alpha   :: Alpha -- ^ Alpha Code
  , numeric :: Int   -- ^ Numeric code
  , minor   :: Int   -- ^ Number of decimal units
  , name    :: Text  -- ^ English name
  , active  :: Bool  -- ^ True if the currency is still in circulation
} deriving (Show, Eq, Read, Generic, Data, Typeable)

@jbransen
Copy link
Collaborator Author

jbransen commented Mar 2, 2018

Right, of course!

@KtorZ
Copy link
Collaborator

KtorZ commented Mar 2, 2018

I'll spend a bit of time on #2 tomorrow. I'll see if I can tackle this #3 after.

@MaxGabriel MaxGabriel linked a pull request Dec 27, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants