From fbd7ac5554561587e3d1c08ec125ab2d7b5ebb09 Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 19 Jan 2019 12:31:55 +0000 Subject: 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. --- app/Main.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app') 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 -- cgit