Skip to content

Commit ee7484d

Browse files
committed
Remove what's now the identity function.
1 parent 0d82a3e commit ee7484d

File tree

2 files changed

+0
-8
lines changed

2 files changed

+0
-8
lines changed

compiler/ml/ast_uncurried.ml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ let expr_extract_uncurried_fun (expr : Parsetree.expression) =
3838
| Pexp_fun (_, _, _, _, Some _) -> expr
3939
| _ -> assert false
4040

41-
let remove_fun (expr : Parsetree.expression) =
42-
match expr.pexp_desc with
43-
| Pexp_construct ({txt = Lident "Function$"}, Some e) -> e
44-
| _ -> expr
45-
4641
let core_type_is_uncurried_fun (typ : Parsetree.core_type) =
4742
match typ.ptyp_desc with
4843
| Ptyp_constr ({txt = Lident "function$"}, [{ptyp_desc = Ptyp_arrow _}; _]) ->

compiler/syntax/src/res_parens.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,6 @@ let unary_expr_operand expr =
8383
match opt_braces with
8484
| Some ({Location.loc = braces_loc}, _) -> Braced braces_loc
8585
| None -> (
86-
let expr = Ast_uncurried.remove_fun expr in
8786
match expr with
8887
| {Parsetree.pexp_attributes = attrs}
8988
when match ParsetreeViewer.filter_parsing_attrs attrs with
@@ -167,7 +166,6 @@ let rhs_binary_expr_operand parent_operator rhs =
167166
| _ -> false
168167

169168
let flatten_operand_rhs parent_operator rhs =
170-
let rhs = Ast_uncurried.remove_fun rhs in
171169
match rhs.Parsetree.pexp_desc with
172170
| Parsetree.Pexp_apply
173171
( {
@@ -241,7 +239,6 @@ let is_negative_constant constant =
241239
| _ -> false
242240

243241
let field_expr expr =
244-
let expr = Ast_uncurried.remove_fun expr in
245242
let opt_braces, _ = ParsetreeViewer.process_braces_attr expr in
246243
match opt_braces with
247244
| Some ({Location.loc = braces_loc}, _) -> Braced braces_loc

0 commit comments

Comments
 (0)