aboutsummaryrefslogtreecommitdiffstats
path: root/src/VeriFuzz/Verilog/BitVec.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@ymhg.org>2019-04-15 19:50:49 +0100
committerYann Herklotz <git@ymhg.org>2019-04-15 19:50:49 +0100
commit705bdb142b1088676ddc3178d8677bd40ab2b1d6 (patch)
tree74ad534cb5bb6b5156f8b468a149263ece2bdda5 /src/VeriFuzz/Verilog/BitVec.hs
parent398aefd8a90e8f7ade6958ccd8e006308fbf1410 (diff)
downloadverismith-705bdb142b1088676ddc3178d8677bd40ab2b1d6.tar.gz
verismith-705bdb142b1088676ddc3178d8677bd40ab2b1d6.zip
Format with brittany and add right modules
Diffstat (limited to 'src/VeriFuzz/Verilog/BitVec.hs')
-rw-r--r--src/VeriFuzz/Verilog/BitVec.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/VeriFuzz/Verilog/BitVec.hs b/src/VeriFuzz/Verilog/BitVec.hs
index 436af7b..cdae0f7 100644
--- a/src/VeriFuzz/Verilog/BitVec.hs
+++ b/src/VeriFuzz/Verilog/BitVec.hs
@@ -104,12 +104,12 @@ rotateBitVec b@(BitVec s _) n | n >= 0 = iterate rotateL1 b !! n
testBits a b' n' = if testBit n' a then bit b' else zeroBits
width' :: Integer -> Int
-width' a | a == 0 = 1
+width' a | a == 0 = 1
| otherwise = width'' a
- where
- width'' a' | a' == 0 = 0
- | a' == -1 = 1
- | otherwise = 1 + width'' (shiftR a' 1)
+ where
+ width'' a' | a' == 0 = 0
+ | a' == -1 = 1
+ | otherwise = 1 + width'' (shiftR a' 1)
both :: (a -> b) -> (a, a) -> (b, b)
both f (a, b) = (f a, f b)