The deka package

[Tags: bsd3, library]

deka provides decimal floating point arithmetic. It is based on mpdecimal, the C library used to provide support for the Decimal module in Python 3.

You will need to install mpdecimal to use deka; otherwise your executables will not link. It is available at

mpdecimal has also been packaged for some Linux distributions, such as Debian (libmpdec-dev - available in Jessie and later) and Arch (mpdecimal).

mpdecimal, in turn, implements the General Decimal Arithmetic Specification, which is available at

For more on deka, please see the Github home page at

Tests are packaged separately in the deka-tests package.

[Skip to ReadMe]


Change logChangeLog
Dependenciesbase (>= && <4.8), bytestring (>= && <0.11), parsec (>=3.1.2 && <3.2), transformers (>= && <0.5) [details]
CopyrightCopyright 2014 Omari Norman
AuthorOmari Norman
MaintainerOmari Norman,
Home page
Bug tracker
Source repositoryhead: git clone
UploadedWed Jul 16 13:12:44 UTC 2014 by OmariNorman
Downloads1100 total (39 in last 30 days)
0 []
StatusDocs uploaded by user
Build status unknown [no reports yet]




Maintainers' corner

For package maintainers and hackage trustees

Readme for deka-


deka provides correctly rounded decimal arithmetic for Haskell.

The core of deka is a binding to the C library mpdecimal. You need to install mpdecimal; otherwise, your executables will not link. mpdecimal is available here:

mpdecimal has also been packaged for some Linux distributions, such as Debian (libmpdec-dev) and Arch (mpdecimal). deka has been tested with mpdecimal version 2.4.0.

As the author of deka, I have no association with the author of mpdecimal, and any errors in this library are mine and should be reported to or to the Github tracker at

You will want to understand the General Decimal Arithmetic Specification in order to fully understand deka. The specification is at

and more about decimal arithmetic generally at


The main deka library depends only on base, bytestring, and parsec, so it shouldn't be difficult to build. The tests use tasty and QuickCheck.

Test status

deka is tested using the tests available on the General Decimal Arithmetic website:

Some of these tests currently fail. The failures are in edge cases that should not affect most usage. Diagnosing these failures is on the TODO list.

More documentation

Much more documentation is available in the Haddock comments in the source files. There is also a file of examples to get you started. It has copious comments. It is written in literate Haskell, so the compiler keeps me honest with the example code. Unfortunately Haddock does not play very nice with literate Haskell. However, the file is easy to view on Github:



deka is licensed under the BSD license, see the LICENSE file.