packages feed

exact-pi 0.4.1.0 → 0.4.1.1

raw patch · 3 files changed

+8/−3 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

changelog.md view
@@ -1,3 +1,7 @@+0.4.1.1
+-------
+* Fixed infinite loop in definition of negate.
+
 0.4.1.0
 -------
 * Added function for computing rational approximations of ExactPi values.
exact-pi.cabal view
@@ -2,11 +2,12 @@ -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                exact-pi
-version:             0.4.1.0
+version:             0.4.1.1
 synopsis:            Exact rational multiples of pi (and integer powers of pi)
 description:         Provides an exact representation for rational multiples of pi alongside an approximate representation of all reals.
                      Useful for storing and computing with conversion factors between physical units.
-homepage:            https://github.com/dmcclean/exact-pi
+homepage:            https://github.com/dmcclean/exact-pi/
+bug-reports:         https://github.com/dmcclean/exact-pi/issues/
 license:             MIT
 license-file:        LICENSE
 author:              Douglas McClean
src/Data/ExactPi.hs view
@@ -135,7 +135,7 @@   abs (Approximate x) = Approximate $ abs x
   signum (Exact _ q) = Exact 0 (signum q)
   signum (Approximate x) = Approximate $ signum x -- we leave this tagged as approximate because we don't know "how" approximate the input was. a case could be made for exact answers here.
-  negate x = (-1) * x
+  negate x = (Exact 0 (-1)) * x
 
 instance Fractional ExactPi where
   fromRational = Exact 0