Commits

Iago Abal committed 55ff78c

Remove bad RULE, bitVec /= BV when the argument is negative
#fix

Comments (0)

Files changed (1)

Data/BitVector.hs

 bitVec :: Integral a => Int -> a -> BV
 bitVec n a | a >= 0    = BV n $ fromIntegral a
            | otherwise = negate $ BV n $ fromIntegral (-a)
-{-# RULES "bitVec/Integer" bitVec = BV #-}
+{-# SPECIALIZE bitVec :: Int -> Integer -> BV #-}
 {-# SPECIALIZE bitVec :: Int -> Int -> BV #-}
 {-# INLINE[1] bitVec #-}