From 9c6fd908aa4f9f83dd4d5428bbdbb8532aa2a045 Mon Sep 17 00:00:00 2001 From: Tom Smeding Date: Tue, 29 Apr 2025 15:56:46 +0200 Subject: Simplify: Don't forget about effects -.- --- src/Simplify.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3-70-g09d2