diff options
author | Yann Herklotz <git@yannherklotz.com> | 2019-11-05 10:17:31 +0000 |
---|---|---|
committer | Yann Herklotz <git@yannherklotz.com> | 2019-11-05 10:17:31 +0000 |
commit | dbdea9bc47513b3643c981043c806647fdcf89b4 (patch) | |
tree | f89b4387e9d78166ccb52b3dab6d970d3ece06c2 /src/Verismith/Verilog | |
parent | a083073ec8ccac04861e06223b117304bd517565 (diff) | |
download | verismith-dbdea9bc47513b3643c981043c806647fdcf89b4.tar.gz verismith-dbdea9bc47513b3643c981043c806647fdcf89b4.zip |
Add reduction pass to remove constants from concat
Diffstat (limited to 'src/Verismith/Verilog')
-rw-r--r-- | src/Verismith/Verilog/AST.hs | 6 |
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) |