more aggressive expression simplification

This commit is contained in:
Zachary Snow 2020-02-09 19:56:28 -05:00
parent 9036bbabe4
commit df4244d8d5
2 changed files with 3 additions and 0 deletions

View File

@ -73,6 +73,8 @@ convertExpr info (Mux cc aa bb) =
after = simplify before
convertExpr _ (other @ Repeat{}) = traverseNestedExprs simplify other
convertExpr _ (other @ Concat{}) = simplify other
convertExpr _ (other @ BinOp{}) = simplify other
convertExpr _ (other @ UniOp{}) = simplify other
convertExpr _ other = other
substitute :: Info -> Expr -> Expr

View File

@ -171,6 +171,7 @@ readNumber n =
readMaybe n' :: Maybe Int
where
n' = case n of
'3' : '2' : '\'' : 'd' : rest -> rest
'\'' : 'd' : rest -> rest
_ -> n