summaryrefslogtreecommitdiff
path: root/src/Simplify.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Simplify.hs')
-rw-r--r--src/Simplify.hs13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs
index d3ee03c..e32ba8c 100644
--- a/src/Simplify.hs
+++ b/src/Simplify.hs
@@ -121,11 +121,12 @@ simplify' = \case
EIdx _ a b -> EIdx ext <$> simplify' a <*> simplify' b
EShape _ e -> EShape ext <$> simplify' e
EOp _ op e -> EOp ext op <$> simplify' e
- ECustom _ s t a b c e1 e2 ->
- ECustom ext s t <$> (let ?accumInScope = False in simplify' a)
- <*> (let ?accumInScope = False in simplify' b)
- <*> (let ?accumInScope = False in simplify' c)
- <*> simplify' e1 <*> simplify' e2
+ ECustom _ s t p a b c e1 e2 ->
+ ECustom ext s t p
+ <$> (let ?accumInScope = False in simplify' a)
+ <*> (let ?accumInScope = False in simplify' b)
+ <*> (let ?accumInScope = False in simplify' c)
+ <*> simplify' e1 <*> simplify' e2
EWith e1 e2 -> EWith <$> simplify' e1 <*> (let ?accumInScope = True in simplify' e2)
EAccum i e1 e2 e3 -> EAccum i <$> simplify' e1 <*> simplify' e2 <*> simplify' e3
EZero t -> pure $ EZero t
@@ -165,7 +166,7 @@ hasAdds = \case
ESum1Inner _ e -> hasAdds e
EUnit _ e -> hasAdds e
EReplicate1Inner _ a b -> hasAdds a || hasAdds b
- ECustom _ _ _ a b c d e -> hasAdds a || hasAdds b || hasAdds c || hasAdds d || hasAdds e
+ ECustom _ _ _ _ a b c d e -> hasAdds a || hasAdds b || hasAdds c || hasAdds d || hasAdds e
EConst _ _ _ -> False
EIdx0 _ e -> hasAdds e
EIdx1 _ a b -> hasAdds a || hasAdds b