diff options
author | Yann Herklotz <git@yannherklotz.com> | 2020-05-12 19:50:10 +0100 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2020-05-12 19:50:10 +0100 |
commit | 13c9197202eade844f9e068c22faccf312e4b3dd (patch) | |
tree | 987b7b4f3c0ef4366c8cae8b0e17cd69854b1780 | |
parent | c4aae71d05aeb06e7017aa771f1518d5dc7431ab (diff) | |
download | verismith-13c9197202eade844f9e068c22faccf312e4b3dd.tar.gz verismith-13c9197202eade844f9e068c22faccf312e4b3dd.zip |
Add line count to reduction
-rw-r--r-- | src/Verismith/Reduce.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/Verismith/Reduce.hs b/src/Verismith/Reduce.hs index b12933e..dde2c8b 100644 --- a/src/Verismith/Reduce.hs +++ b/src/Verismith/Reduce.hs @@ -49,7 +49,7 @@ import Data.List (nub) import Data.List.NonEmpty (NonEmpty (..)) import qualified Data.List.NonEmpty as NonEmpty import Data.Maybe (mapMaybe) -import Data.Text (Text) +import Data.Text (Text, unpack) import Shelly ((<.>), fromText) import qualified Shelly import Shelly.Lifted (MonadSh, liftSh, rm_rf, writefile) @@ -597,10 +597,12 @@ reduce_ out eval title tag untag repl bot usrc = do writefile out $ genSource src liftSh . Shelly.echo - $ "Reducing " <> title <> " (Modules: " + $ "Reducing " <> title <> " (modules: " <> showT (length . getVerilog $ _infoSrc src) - <> ", Module items: " + <> ", module items: " <> showT (length (src ^.. infoSrc . _Wrapped . traverse . modItems . traverse)) + <> ", loc: " + <> showT (length . lines . unpack $ genSource usrc) <> ")" if bot src then return $ untag src |