currency-convert: Typesafe currency conversion

[ bsd3, data, library ] [ Propose Tags ]

A typesafe currency conversion system with a various exchange rate sources for over 30 currencies.

[Skip to Readme]




Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


  • No Candidates
Versions [RSS],,
Dependencies aeson (>=0.9 && <0.10), base (>=4.8 && <4.9), http-conduit (>=2.2 && <2.3), text (>=1.2 && <1.3), unordered-containers (>=0.2 && <0.3) [details]
License BSD-3-Clause
Author Tuomas Laakkonen
Revised Revision 1 made by pigworts2 at 2016-08-05T20:24:06Z
Category Data
Home page
Uploaded by pigworts2 at 2016-08-05T14:58:37Z
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 2136 total (8 in the last 30 days)
Rating 2.0 (votes: 1) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]

Readme for currency-convert-

[back to package description]


Property Value
Module Data.Currency.Convert
Description Typesafe currency coversion using exchange rates from various sources.
Copyright © Tuomas Laakkonen 2016
License BSD3
Stability Experimental
Portability Non-portable (GHC extensions)

This module allows values of currency to be converted from one currency to another using exchange rates from various sources.

The basic operation for this module is as follows:

First, get a conversion function (with getDefaultConverter or getConverter):

    >>> Converter convert <- getDefaultConverter

Then, construct some value of currency using the convenience functions, and convert it using the convert function you just got:

    >>> convert (usd 100) :: EUR
    90.0 eur

The result type of convert defines what currency the value will be converted into.

Currency implements Num, Fractional and Real so the usual arithmetic operations are defined, and its value can be extracted with toRational.