binary-list 1.0.0.0 → 1.0.0.1
raw patch · 3 files changed
+6/−6 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- Data/BinaryList.hs +2/−2
- Data/BinaryList/Serialize.hs +3/−3
- binary-list.cabal +1/−1
Data/BinaryList.hs view
@@ -15,7 +15,7 @@ -- Since many names in this module clash with the names of some "Prelude" -- functions, you probably want to import this module this way: ----- > import Data.BinaryList (BinList)+-- > import Data.BinaryList (BinList,Exponent) -- > import qualified Data.BinaryList as BL -- -- Remember that binary lists are an instance of the 'Foldable' and 'Traversable'@@ -575,7 +575,7 @@ > Nothing -> xs > Just ps -> > let (evens,odds) = BL.unzip ps-> n = BL.lengthIndex xs - 1+> n = BL.lengthExponent xs - 1 > q = negate $ pi * i / fromIntegral (2^n) > twiddles = BL.generate n $ \k -> exp $ q * fromIntegral k > oddsfft = BL.zipWith (*) twiddles $ fft odds
Data/BinaryList/Serialize.hs view
@@ -145,7 +145,7 @@ -- | Function to get binary trees using the supplied 'Get' value. -- The order of the elements depends on the encoding direction. --- -- getBinList :: Int -> Get (BinList a)+ -- getBinList :: Exponent-> Get (BinList a) getBinList = case d of FromLeft -> \i -> replicateA i f@@ -155,7 +155,7 @@ -- where the order of appending depends on the encoding -- direction. --- -- recAppend :: Int -> BinList a -> BinList a -> BinList a+ -- recAppend :: Exponent -> BinList a -> BinList a -> BinList a recAppend = case d of FromLeft -> \i -> ListNode (i+1) _ -> \i -> flip $ ListNode (i+1)@@ -187,7 +187,7 @@ -- We start with 0 if the direction is left-to-right, and -- with 1 if the direction is right-to-left. putWord8 $ if d == FromLeft then 0 else 1- -- Int values are converted to Word64 (note that Word32 does not contain every Int in a+ -- Exponent values are converted to Word64 (note that Word32 does not contain every Int in a -- 64-bit system). Then the Word64 value is encoded in big-endian format. putWord64be $ fromIntegral l putLazyByteString b
binary-list.cabal view
@@ -1,5 +1,5 @@ name: binary-list-version: 1.0.0.0+version: 1.0.0.1 synopsis: Lists of length a power of two. description: Implementation of lists whose number of elements is a power of two. Binary lists have this property by definition,