packages feed

deferred-folds 0.9.18.8 → 0.9.18.9

raw patch · 3 files changed

+13/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

deferred-folds.cabal view
@@ -1,6 +1,6 @@ cabal-version: 3.0 name:          deferred-folds-version:       0.9.18.8+version:       0.9.18.9 category:      Folding synopsis:      Abstractions over deferred folds description:
library/DeferredFolds/Defs/UnfoldlM.hs view
@@ -125,6 +125,7 @@ foldrRunner :: (Monad m) => (forall x. (a -> x -> x) -> x -> x) -> UnfoldlM m a foldrRunner run = UnfoldlM (\stepM -> run (\x k z -> stepM z x >>= k) return) +{-# INLINEABLE unfoldr #-} unfoldr :: (Monad m) => Unfoldr a -> UnfoldlM m a unfoldr (Unfoldr unfoldr) = foldrRunner unfoldr 
library/DeferredFolds/Defs/Unfoldr.hs view
@@ -207,42 +207,50 @@  -- | -- Binary digits of a non-negative integral number.+{-# INLINEABLE binaryDigits #-} binaryDigits :: (Integral a) => a -> Unfoldr a binaryDigits = reverse . reverseBinaryDigits  -- | -- Binary digits of a non-negative integral number in reverse order.+{-# INLINEABLE reverseBinaryDigits #-} reverseBinaryDigits :: (Integral a) => a -> Unfoldr a reverseBinaryDigits = reverseDigits 2  -- | -- Octal digits of a non-negative integral number.+{-# INLINEABLE octalDigits #-} octalDigits :: (Integral a) => a -> Unfoldr a octalDigits = reverse . reverseOctalDigits  -- | -- Octal digits of a non-negative integral number in reverse order.+{-# INLINEABLE reverseOctalDigits #-} reverseOctalDigits :: (Integral a) => a -> Unfoldr a reverseOctalDigits = reverseDigits 8  -- | -- Decimal digits of a non-negative integral number.+{-# INLINEABLE decimalDigits #-} decimalDigits :: (Integral a) => a -> Unfoldr a decimalDigits = reverse . reverseDecimalDigits  -- | -- Decimal digits of a non-negative integral number in reverse order. -- More efficient than 'decimalDigits'.+{-# INLINEABLE reverseDecimalDigits #-} reverseDecimalDigits :: (Integral a) => a -> Unfoldr a reverseDecimalDigits = reverseDigits 10  -- | -- Hexadecimal digits of a non-negative number.+{-# INLINEABLE hexadecimalDigits #-} hexadecimalDigits :: (Integral a) => a -> Unfoldr a hexadecimalDigits = reverse . reverseHexadecimalDigits  -- | -- Hexadecimal digits of a non-negative number in reverse order.+{-# INLINEABLE reverseHexadecimalDigits #-} reverseHexadecimalDigits :: (Integral a) => a -> Unfoldr a reverseHexadecimalDigits = reverseDigits 16 @@ -256,6 +264,7 @@ -- binaryDigits :: Integral a => a -> Unfoldr a -- binaryDigits = 'reverse' . 'reverseDigits' 2 -- @+{-# INLINEABLE reverseDigits #-} reverseDigits ::   (Integral a) =>   -- | Radix@@ -300,6 +309,7 @@  -- | -- Indices of set bits.+{-# INLINEABLE setBitIndices #-} setBitIndices :: (FiniteBits a) => a -> Unfoldr Int setBitIndices a =   let !size = finiteBitSize a@@ -315,6 +325,7 @@  -- | -- Indices of unset bits.+{-# INLINEABLE unsetBitIndices #-} unsetBitIndices :: (FiniteBits a) => a -> Unfoldr Int unsetBitIndices a =   let !size = finiteBitSize a