aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2020-05-13 01:15:44 +0100
committerYann Herklotz <git@yannherklotz.com>2020-05-13 01:15:44 +0100
commit501cac8b2eda9e68c200231bdabca17ac48264d7 (patch)
tree9be8adf9c93e430dcb1c0c6d3b39b0aa33a2ea15 /src/Verismith.hs
parentd79412813c44767df06bce0d33f7472b30814a30 (diff)
parentd50a0b5b57aae1c7558fa77c362ae2e36038b63c (diff)
downloadverismith-501cac8b2eda9e68c200231bdabca17ac48264d7.tar.gz
verismith-501cac8b2eda9e68c200231bdabca17ac48264d7.zip
Merge branch 'master' into dev/reducerdev/reducer
Diffstat (limited to 'src/Verismith.hs')
-rw-r--r--src/Verismith.hs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Verismith.hs b/src/Verismith.hs
index 4fb52ac..c329678 100644
--- a/src/Verismith.hs
+++ b/src/Verismith.hs
@@ -71,6 +71,8 @@ import Verismith.Tool
import Verismith.Tool.Internal
import Verismith.Utils (generateByteString)
import Verismith.Verilog
+import Verismith.Verilog
+import Verismith.Verilog.Distance
import Verismith.Verilog.Parser (parseSourceInfoFile)
import Prelude hiding (FilePath)
@@ -236,6 +238,11 @@ handleOpts (ConfigOpt c conf r) = do
T.unpack
. toTextIgnore
<$> c
+handleOpts (DistanceOpt v1 v2) = do
+ src1 <- parseSourceInfoFile (T.pack v1) (toTextIgnore v1)
+ src2 <- parseSourceInfoFile (T.pack v2) (toTextIgnore v2)
+ let d = distance src1 src2
+ putStrLn ("Distance: " <> show d)
defaultMain :: IO ()
defaultMain = do