packages feed

numbers 2009.5.20.1 → 2009.5.28.1

raw patch · 2 files changed

+10/−5 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Data/Number/Natural.hs view
@@ -66,12 +66,17 @@     pred (S a) = a     toEnum = fromIntegral     fromEnum = fromIntegral-    enumFromThenTo from thn to = go from (to `maybeSubtract` from) where+    enumFromThenTo from thn to | from <= thn = go from (to `maybeSubtract` from) where       go from Nothing      = []-      go from (Just count) = from:go (thn + from) (count `maybeSubtract` thn)-    enumFrom a       = enumFromThenTo a 1 infinity+      go from (Just count) = from:go (step + from) (count `maybeSubtract` step)+      step = thn - from+    enumFromThenTo from thn to | otherwise = go (from + step) where+      go from | from >= to + step = let next = from - step in next:go next+              | otherwise         = []+      step = from - thn+    enumFrom a       = enumFromThenTo a (S a) infinity     enumFromThen a b = enumFromThenTo a b infinity-    enumFromTo a c   = enumFromThenTo a 1 c+    enumFromTo a c   = enumFromThenTo a (S a) c  -- | The infinite natural number. infinity :: Natural
numbers.cabal view
@@ -1,5 +1,5 @@ Name:		numbers-Version:	2009.5.20.1+Version:	2009.5.28.1 License:	BSD3 Author:		Lennart Augustsson Maintainer:	Lennart Augustsson