summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2025-04-29 15:56:46 +0200
committerTom Smeding <tom@tomsmeding.com>2025-04-29 15:57:17 +0200
commit9c6fd908aa4f9f83dd4d5428bbdbb8532aa2a045 (patch)
tree6466cedf6258a3bddfac99adb9a487ecd029a35e /src
parenta1074fc851afcb6e858285ab9c6585b042ac1782 (diff)
Simplify: Don't forget about effects -.-
Diffstat (limited to 'src')
-rw-r--r--src/Simplify.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs
index 469c7a1..140e673 100644
--- a/src/Simplify.hs
+++ b/src/Simplify.hs
@@ -229,7 +229,8 @@ simplify'Rec = \case
(\(OneHotTerm t' p' e1'' e2'') -> return (EOneHot ext t' p' e1'' e2''))
-- type-specific equations for plus
- EPlus _ SMTNil _ _ -> (Any True, ENil ext)
+ EPlus _ SMTNil e1 e2 | not (hasAdds e1), not (hasAdds e2) ->
+ acted $ return (ENil ext)
EPlus _ (SMTPair t1 t2) (EPair _ a1 b1) (EPair _ a2 b2) ->
acted $ simplify' $ EPair ext (EPlus ext t1 a1 a2) (EPlus ext t2 b1 b2)