mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-19 16:28:12 +03:00
Remove unconditional optimisation on exceptions compilation
This should be handled at a different level
This commit is contained in:
parent
8920564f9e
commit
fcb2d08983
@ -64,15 +64,6 @@ and translate_expr (ctx : 'm ctx) (e : 'm D.expr) : 'm A.expr boxed =
|
||||
Expr.ecatch (translate_expr ctx arg) EmptyError
|
||||
(Expr.eraise NoValueProvided m)
|
||||
m
|
||||
| EDefault { excepts = [exn]; just; cons }
|
||||
(* Specific optimisation for this case *) ->
|
||||
(* FIXME: this case used to be disabled when optimisations are disabled, but
|
||||
the flag isn't forwarded to this function *)
|
||||
Expr.ecatch (translate_expr ctx exn) EmptyError
|
||||
(Expr.eifthenelse (translate_expr ctx just) (translate_expr ctx cons)
|
||||
(Expr.eraise EmptyError (Mark.get e))
|
||||
(Mark.get e))
|
||||
(Mark.get e)
|
||||
| EDefault { excepts; just; cons } ->
|
||||
translate_default ctx excepts just cons (Mark.get e)
|
||||
| EOp { op; tys } -> Expr.eop (Operator.translate op) tys m
|
||||
|
@ -238,7 +238,6 @@ module Op = struct
|
||||
| Map : < polymorphic ; .. > t
|
||||
| Concat : < polymorphic ; .. > t
|
||||
| Filter : < polymorphic ; .. > t
|
||||
| Reduce : < polymorphic ; .. > t
|
||||
(* * overloaded *)
|
||||
| Add : < overloaded ; .. > t
|
||||
| Add_int_int : < resolved ; .. > t
|
||||
@ -298,6 +297,7 @@ module Op = struct
|
||||
| Eq_dat_dat : < resolved ; .. > t
|
||||
(* ternary *)
|
||||
(* * polymorphic *)
|
||||
| Reduce : < polymorphic ; .. > t
|
||||
| Fold : < polymorphic ; .. > t
|
||||
| HandleDefault : < polymorphic ; .. > t
|
||||
| HandleDefaultOpt : < polymorphic ; .. > t
|
||||
|
Loading…
Reference in New Issue
Block a user