packages feed

approximate-equality 1.0 → 1.1

raw patch · 2 files changed

+7/−2 lines, 2 filesdep ~basePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base

API changes (from Hackage documentation)

- Data.Eq.Approximate: instance (AbsoluteTolerance tolerance, Ord value, Fractional value) => Show (AbsolutelyApproximateValue tolerance value)
- Data.Eq.Approximate: instance (ZeroTolerance zerotol, RelativeTolerance reltol, Ord value, Fractional value) => Show (RelativelyApproximateValue zerotol reltol value)
+ Data.Eq.Approximate: instance (AbsoluteTolerance tolerance, Ord value, Fractional value, Show value) => Show (AbsolutelyApproximateValue tolerance value)
+ Data.Eq.Approximate: instance (ZeroTolerance zerotol, RelativeTolerance reltol, Ord value, Fractional value, Show value) => Show (RelativelyApproximateValue zerotol reltol value)

Files

Data/Eq/Approximate.hs view
@@ -130,6 +130,7 @@ instance (AbsoluteTolerance tolerance          ,Ord value          ,Fractional value+         ,Show value          ) =>          Show (AbsolutelyApproximateValue tolerance value)   where@@ -265,6 +266,7 @@          ,RelativeTolerance reltol          ,Ord value          ,Fractional value+         ,Show value          ) =>          Show (RelativelyApproximateValue zerotol reltol value)   where
approximate-equality.cabal view
@@ -1,5 +1,5 @@ Name:                approximate-equality-Version:             1.0+Version:             1.1 License:             BSD3 License-file:        LICENSE Author:              Gregory Crosswhite@@ -8,12 +8,15 @@ Homepage:            http://github.com/gcross/approximate-equality Synopsis:            Newtype wrappers for approximate equality Description:         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.++                     New in version 1.1:  Added explicit Show constraints to the Show instances, as the Num class in the newest version of GHC (wisely) no longer includes Show as a constraint. Cabal-version:       >=1.2.3 Build-type:          Simple Category:	          Data  Library-    Build-depends:   base >= 3 && < 5,+    Build-depends:   base >= 3 && < 4.6,                      type-level-natural-number >= 1.0 && < 1.1     Exposed-modules: Data.Eq.Approximate