The approximate-equality package

[ Tags: bsd3, data, library ] [ Propose Tags ]

The purpose of this module is to provide newtype wrappers that allow one to effectively override the equality operator of a value so that it is approximate rather than exact. The wrappers use type annotations to specify the tolerance; the Digits type constructor has been provided for specifying the tolerance using type-level natural numbers. Instances for all of the classes in the numerical hierarchy have been provided for the wrappers, so the wrapped values can mostly be used in the same way as the original values. (In fact, most of the time one doesn't even have to wrap the starting values, since expressions such as (1+sqrt 2/3) are automatically wrapped thanks to the fromIntegral method of the Num typeclass.) See the documentation for Data.Eq.Approximate for more detailed information on how to use this package.


Versions 1.0, 1.1,,
Dependencies base (>=3 && <5), type-level-natural-number (==1.0.*) [details]
License BSD3
Author Gregory Crosswhite
Maintainer Gregory Crosswhite <>
Category Data
Home page
Uploaded Tue Aug 3 04:14:21 UTC 2010 by GregoryCrosswhite
Distributions NixOS:
Downloads 1114 total (9 in the last 30 days)
Rating 0.0 (0 ratings) [clear rating]
  • λ
  • λ
  • λ
Status Docs uploaded by user
Build status unknown [no reports yet]
Hackage Matrix CI




Maintainer's Corner

For package maintainers and hackage trustees