packages feed

word24 0.1.4 → 1.0.0

raw patch · 3 files changed

+9/−35 lines, 3 files

Files

src/Data/Int/Int24.hs view
@@ -51,11 +51,13 @@ -- fill the uppermost bits with 1s.  Otherwise clear them to 0s. narrow24Int# :: Int# -> Int# narrow24Int# x# = if (x'# `and#` mask#) `eqWord#` mask#-  then word2Int# ( x'# `or#` int2Word# 0xFF800000# )-  else word2Int# ( x'# `and#` (int2Word# 0xFFFFFF#))+  then word2Int# ( x'# `or#` int2Word# m1# )+  else word2Int# ( x'# `and#` (int2Word# m2#))   where-    !x'# = int2Word# x#+    !x'#   = int2Word# x#     !mask# = int2Word# 0x00800000#+    !(I# m1#) = -8388608+    !(I# m2#) = 16777215  instance Show Int24 where     showsPrec p x = showsPrec p (fromIntegral x :: Int)
tests/QCUtils.hs view
@@ -24,31 +24,3 @@  instance CoArbitrary Word24 where   coarbitrary = coarbitraryIntegral--instance Arbitrary Int16 where-  arbitrary = arbitraryBoundedIntegral-  shrink = shrinkIntegral--instance CoArbitrary Int16 where-  coarbitrary = coarbitraryIntegral--instance Arbitrary Word8 where-  arbitrary = arbitraryBoundedIntegral-  shrink = shrinkIntegral--instance CoArbitrary Word8 where-  coarbitrary = coarbitraryIntegral--instance Arbitrary Word16 where-  arbitrary = arbitraryBoundedIntegral-  shrink = shrinkIntegral--instance CoArbitrary Word16 where-  coarbitrary = coarbitraryIntegral--instance Arbitrary Word32 where-  arbitrary = arbitraryBoundedIntegral-  shrink = shrinkIntegral--instance CoArbitrary Word32 where-  coarbitrary = coarbitraryIntegral
word24.cabal view
@@ -1,5 +1,5 @@ name:		word24-version:        0.1.4+version:        1.0.0 synopsis:       24-bit word and int types for GHC description:	24-bit Word and Int data types. category:       Data@@ -7,8 +7,8 @@ maintainer:	John W. Lato, jwlato@gmail.com license:	BSD3 license-file:	LICENSE-homepage:       http://inmachina.net/~jwlato/haskell/word24-tested-with:    GHC == 6.12.1, GHC == 6.10.4+homepage:       http://www.tiresiaspress.us/haskell/word24+tested-with:    GHC == 6.12.3, GHC == 7.0.3 stability:	experimental  cabal-version:  >= 1.6@@ -72,4 +72,4 @@  source-repository head   type:     darcs-  location: http://inmachina.net/~jwlato/haskell/word24+  location: http://www.tiresiaspress.us/haskell/word24