diff options
Diffstat (limited to 'src/Simplify.hs')
-rw-r--r-- | src/Simplify.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs index 39b3afd..af0ca4c 100644 --- a/src/Simplify.hs +++ b/src/Simplify.hs @@ -74,6 +74,7 @@ simplify' = \case EBuild _ es e -> EBuild ext (fmap simplify' es) (simplify' e) EFold1 _ a b -> EFold1 ext (simplify' a) (simplify' b) EConst _ t v -> EConst ext t v + EIdx0 _ e -> EIdx0 ext (simplify' e) EIdx1 _ a b -> EIdx1 ext (simplify' a) (simplify' b) EIdx _ e es -> EIdx ext (simplify' e) (fmap simplify' es) EOp _ op e -> EOp ext op (simplify' e) @@ -105,6 +106,7 @@ hasAdds = \case EBuild _ es e -> getAny (foldMap (Any . hasAdds) es) || hasAdds e EFold1 _ a b -> hasAdds a || hasAdds b EConst _ _ _ -> False + EIdx0 _ e -> hasAdds e EIdx1 _ a b -> hasAdds a || hasAdds b EIdx _ e es -> hasAdds e || getAny (foldMap (Any . hasAdds) es) EOp _ _ e -> hasAdds e |