aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorYann Herklotz <ymherklotz@gmail.com>2019-01-19 12:31:55 +0000
committerYann Herklotz <ymherklotz@gmail.com>2019-01-19 12:31:55 +0000
commitfbd7ac5554561587e3d1c08ec125ab2d7b5ebb09 (patch)
tree1aca39dac35484c833caecfa7353143e0b86f2ee /app
parentd5605683a5e927393b89e171306e5d2027016594 (diff)
downloadverismith-fbd7ac5554561587e3d1c08ec125ab2d7b5ebb09.tar.gz
verismith-fbd7ac5554561587e3d1c08ec125ab2d7b5ebb09.zip
Print absolute value of hash
There should be a better solution though using Crypto.Hash.Md5 for example, which works on bytestrings. This could be done by encoding the text as a ByteString and hashing that, or parsing all of the outputs and generating a ByteString from that.
Diffstat (limited to 'app')
-rw-r--r--app/Main.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/Main.hs b/app/Main.hs
index 2e90b37..efa61e6 100644
--- a/app/Main.hs
+++ b/app/Main.hs
@@ -38,7 +38,7 @@ runSimulation = do
let circ = head $ (nestUpTo 5 . generateAST $ Circuit gr) ^.. getVerilogSrc . traverse . getDescription
rand <- genRandom 20
val <- shelly $ runSim defaultIcarus (initMod circ) rand
- putStrLn $ showHex val ""
+ putStrLn $ showHex (abs val) ""
runEquivalence:: IO ()
runEquivalence = do