mirror of
https://github.com/CatalaLang/catala.git
synced 2024-11-08 07:51:43 +03:00
Remove useless optimizations caught just after
This commit is contained in:
parent
9d9a2c4496
commit
af16be501a
@ -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 *)
|
||||
|
Loading…
Reference in New Issue
Block a user