Commits

Iago Abal  committed 2be064a

Tweak @@ precondition

  • Participants
  • Parent commits a3b1bbd

Comments (0)

Files changed (1)

File Data/BitVector.hs

 -- [3]3
 --
 (@@) :: BV -> (Int,Int) -> BV
-(BV _ a) @@ (j,i) = assert (j >= i) $
+(BV _ a) @@ (j,i) = assert (i >= 0 && j >= i) $
     BV m $ (a `shiftR` i) `mod` 2^m
   where m = j - i + 1