packages feed

data-bword 0.1.0.1 → 0.1.0.2

raw patch · 3 files changed

+28/−5 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Data.BinaryWord: type family SignedWord w;
+ Data.BinaryWord: -- | The signed variant type
+ Data.BinaryWord: type SignedWord w;
+ Data.BinaryWord: type UnsignedWord w;
- Data.BinaryWord: class (FiniteBits w, FiniteBits (UnsignedWord w), FiniteBits (SignedWord w)) => BinaryWord w where type UnsignedWord w type SignedWord w lsb = bit 0 testLsb = flip testBit 0 setLsb = flip setBit 0 clearLsb = flip clearBit 0 where {
+ Data.BinaryWord: class (FiniteBits w, FiniteBits (UnsignedWord w), FiniteBits (SignedWord w)) => BinaryWord w where {

Files

README.md view
@@ -1,5 +1,8 @@ Data-BWord ==========++[![Travis](https://img.shields.io/travis/mvv/data-bword/master.svg)](https://travis-ci.org/mvv/data-bword) [![Hackage](https://img.shields.io/hackage/v/data-bword.svg)](http://hackage.haskell.org/package/data-bword)+ This package provides extra (vs `Data.Bits`) operations on binary words of fixed length. 
data-bword.cabal view
@@ -1,5 +1,5 @@ Name: data-bword-Version: 0.1.0.1+Version: 0.1.0.2 Category: Data Stability: experimental Synopsis: Extra operations on binary words of fixed length@@ -18,6 +18,10 @@  Extra-Source-Files:   README.md++Tested-With: GHC==7.6.3, GHC==7.8.4, GHC==7.10.3, GHC==8.0.2, GHC==8.2.2,+             GHC==8.4.4, GHC==8.6.5, GHC==8.8.4, GHC==8.10.7,+             GHC==9.0.2, GHC==9.2.4, GHC==9.4.2  Cabal-Version: >= 1.10.0 Build-Type: Simple
src/Data/BinaryWord.hs view
@@ -3,6 +3,7 @@ #if __GLASGOW_HASKELL__ >= 705 {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnboxedTuples #-}+{-# LANGUAGE BangPatterns #-} #endif {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE FlexibleContexts #-}@@ -24,6 +25,9 @@ #endif #if __GLASGOW_HASKELL__ >= 705 import GHC.Prim (plusWord2#, timesWord2#)+# if __GLASGOW_HASKELL__ >= 904+import GHC.Prim (word64ToWord#, wordToWord64#)+# endif # if WORD_SIZE_IN_BITS == 32 import GHC.Word (Word32(..)) # endif@@ -213,7 +217,7 @@   {-# INLINE signedWord #-} #if __GLASGOW_HASKELL__ >= 705 && WORD_SIZE_IN_BITS == 32   unwrappedAdd (W32# x) (W32# y) = hi `seq` lo `seq` (hi, lo)-    where (# hi', lo' #) = plusWord2# x y+    where !(# hi', lo' #) = plusWord2# x y           lo = W32# lo'           hi = W32# hi' #else@@ -225,7 +229,7 @@   {-# INLINE unwrappedAdd #-} #if __GLASGOW_HASKELL__ >= 705 && WORD_SIZE_IN_BITS == 32   unwrappedMul (W32# x) (W32# y) = hi `seq` lo `seq` (hi, lo)-    where (# hi', lo' #) = timesWord2# x y+    where !(# hi', lo' #) = timesWord2# x y           lo = W32# lo'           hi = W32# hi' #else@@ -290,9 +294,15 @@   {-# INLINE signedWord #-} #if __GLASGOW_HASKELL__ >= 705 && WORD_SIZE_IN_BITS == 64   unwrappedAdd (W64# x) (W64# y) = hi `seq` lo `seq` (hi, lo)-    where (# hi', lo' #) = plusWord2# x y+# if __GLASGOW_HASKELL__ >= 904+    where !(# hi', lo' #) = plusWord2# (word64ToWord# x) (word64ToWord# y)+          lo = W64# (wordToWord64# lo')+          hi = W64# (wordToWord64# hi')+# else+    where !(# hi', lo' #) = plusWord2# x y           lo = W64# lo'           hi = W64# hi'+# endif   {-# INLINE unwrappedAdd #-} #else   unwrappedAdd x y = hi `seq` lo `seq` (hi, lo)@@ -302,9 +312,15 @@ #endif #if __GLASGOW_HASKELL__ >= 705 && WORD_SIZE_IN_BITS == 64   unwrappedMul (W64# x) (W64# y) = hi `seq` lo `seq` (hi, lo)-    where (# hi', lo' #) = timesWord2# x y+# if __GLASGOW_HASKELL__ >= 904+    where !(# hi', lo' #) = timesWord2# (word64ToWord# x) (word64ToWord# y)+          lo = W64# (wordToWord64# lo')+          hi = W64# (wordToWord64# hi')+# else+    where !(# hi', lo' #) = timesWord2# x y           lo = W64# lo'           hi = W64# hi'+# endif   {-# INLINE unwrappedMul #-} #else   unwrappedMul x y = hi `seq` lo `seq` (hi, lo)