From af16be501a7d151a21a40558eb48149f275a615f Mon Sep 17 00:00:00 2001 From: Denis Merigoux Date: Tue, 19 Dec 2023 17:26:36 +0100 Subject: [PATCH] Remove useless optimizations caught just after --- compiler/shared_ast/optimizations.ml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compiler/shared_ast/optimizations.ml b/compiler/shared_ast/optimizations.ml index f64cc59a..8794317f 100644 --- a/compiler/shared_ast/optimizations.ml +++ b/compiler/shared_ast/optimizations.ml @@ -206,12 +206,6 @@ let rec optimize_expr : cases1 cases2 in EMatch { e = arg; cases; name = n1 } - | EApp { f = EAbs { binder; _ }, _; args = [(ELit _, _)] as args } -> - (* beta reduction when let-binding a literal *) - Mark.remove (Bindlib.msubst binder (List.map fst args |> Array.of_list)) - | EApp { f = EAbs { binder; _ }, _; args = [(EVar _, _)] as args } -> - (* beta reduction when let-binding a variable *) - Mark.remove (Bindlib.msubst binder (List.map fst args |> Array.of_list)) | EApp { f = EAbs { binder; _ }, _; args } when binder_vars_used_at_most_once binder (* when variables not used *)