aboutsummaryrefslogtreecommitdiffstats
path: root/src/Verismith/Verilog/AST.hs
diff options
context:
space:
mode:
authorYann Herklotz <git@yannherklotz.com>2019-11-05 10:17:31 +0000
committerYann Herklotz <git@yannherklotz.com>2019-11-05 10:17:31 +0000
commitdbdea9bc47513b3643c981043c806647fdcf89b4 (patch)
treef89b4387e9d78166ccb52b3dab6d970d3ece06c2 /src/Verismith/Verilog/AST.hs
parenta083073ec8ccac04861e06223b117304bd517565 (diff)
downloadverismith-dbdea9bc47513b3643c981043c806647fdcf89b4.tar.gz
verismith-dbdea9bc47513b3643c981043c806647fdcf89b4.zip
Add reduction pass to remove constants from concat
Diffstat (limited to 'src/Verismith/Verilog/AST.hs')
-rw-r--r--src/Verismith/Verilog/AST.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Verismith/Verilog/AST.hs b/src/Verismith/Verilog/AST.hs
index 699d87a..fbe4347 100644
--- a/src/Verismith/Verilog/AST.hs
+++ b/src/Verismith/Verilog/AST.hs
@@ -524,6 +524,12 @@ data SourceInfo = SourceInfo { _infoTop :: {-# UNPACK #-} !Text
}
deriving (Eq, Show, Ord, Data, Generic, NFData)
+instance Semigroup SourceInfo where
+ (SourceInfo t v) <> (SourceInfo _ v2) = SourceInfo t $ v <> v2
+
+instance Monoid SourceInfo where
+ mempty = SourceInfo mempty mempty
+
$(makeLenses ''Expr)
$(makeLenses ''ConstExpr)
$(makeLenses ''Task)