diff options
Diffstat (limited to 'src/Simplify.hs')
-rw-r--r-- | src/Simplify.hs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/src/Simplify.hs b/src/Simplify.hs index 74b6601..28b6d60 100644 --- a/src/Simplify.hs +++ b/src/Simplify.hs @@ -200,6 +200,7 @@ simplify'Rec = \case EMaybe ext (ESnd ext e1) (ESnd ext e2) e3 -- TODO: more array indexing + EIdx _ (EBuild _ _ _ e1) e2 -> acted $ simplify' $ elet e2 e1 EIdx _ (EReplicate1Inner _ _ e2) e3 -> acted $ simplify' $ EIdx ext e2 (EFst ext e3) EIdx _ (EUnit _ e1) _ -> acted $ simplify' $ e1 @@ -336,16 +337,6 @@ simplify'Rec = \case EPlus _ t a b -> [simprec| EPlus ext t *a *b |] EError _ t s -> pure $ EError ext t s -cheapExpr :: Expr x env t -> Bool -cheapExpr = \case - EVar{} -> True - ENil{} -> True - EConst{} -> True - EFst _ e -> cheapExpr e - ESnd _ e -> cheapExpr e - EUnit _ e -> cheapExpr e - _ -> False - -- | This can be made more precise by tracking (and not counting) adds on -- locally eliminated accumulators. hasAdds :: Expr x env t -> Bool |