@@ -302,7 +302,7 @@ module Cl = struct
302302 | Pcl_structure {pcstr_fields= _ :: _ ; _}
303303 | Pcl_let _ | Pcl_open _ | Pcl_extension _ ->
304304 false
305- | Pcl_apply (e , _ ) | Pcl_fun (_ , _ , _ , e ) -> is_simple e
305+ | Pcl_apply (e , _ ) | Pcl_fun (_ , e ) -> is_simple e
306306 | Pcl_constraint (e , t ) -> is_simple e && Cty. is_simple t
307307
308308 (* * [mem_cls cls cl] holds if [cl] is in the named class of expressions
@@ -1125,7 +1125,7 @@ end = struct
11251125 List. exists l ~f: (fun {pci_expr; _} ->
11261126 let rec loop x =
11271127 match x.pcl_desc with
1128- | Pcl_fun (_ , _ , _ , x ) -> loop x
1128+ | Pcl_fun (_ , x ) -> loop x
11291129 | Pcl_constraint (_ , x ) -> x == cty
11301130 | _ -> false
11311131 in
@@ -1151,7 +1151,7 @@ end = struct
11511151 | Cl ctx ->
11521152 assert (
11531153 match ctx.pcl_desc with
1154- | Pcl_fun ( _ , _ , _ , _ ) -> false
1154+ | Pcl_fun _ -> false
11551155 | Pcl_constr _ -> false
11561156 | Pcl_structure _ -> false
11571157 | Pcl_apply _ -> false
@@ -1196,7 +1196,7 @@ end = struct
11961196 cl == x
11971197 ||
11981198 match x.pcl_desc with
1199- | Pcl_fun (_ , _ , _ , x ) -> loop x
1199+ | Pcl_fun (_ , x ) -> loop x
12001200 | Pcl_constraint (x , _ ) -> loop x
12011201 | _ -> false
12021202 in
@@ -1213,7 +1213,7 @@ end = struct
12131213 assert (
12141214 match pcl_desc with
12151215 | Pcl_structure _ -> false
1216- | Pcl_fun (_ , _ , _ , x ) -> x == cl
1216+ | Pcl_fun (_ , x ) -> x == cl
12171217 | Pcl_apply (x , _ ) -> x == cl
12181218 | Pcl_let (_ , x ) -> x == cl
12191219 | Pcl_constraint (x , _ ) -> x == cl
@@ -1316,7 +1316,7 @@ end = struct
13161316 | Cl ctx ->
13171317 assert (
13181318 match ctx.pcl_desc with
1319- | Pcl_fun (_ , _ , p , _ ) -> p == pat
1319+ | Pcl_fun (p , _ ) -> check_function_param p
13201320 | Pcl_constr _ -> false
13211321 | Pcl_structure {pcstr_self; _} ->
13221322 Option. exists ~f: (fun self_ -> self_ == pat) pcstr_self
@@ -1462,8 +1462,7 @@ end = struct
14621462 | Cl ctx ->
14631463 let rec loop ctx =
14641464 match ctx.pcl_desc with
1465- | Pcl_fun (_ , eopt , _ , e ) ->
1466- Option. exists eopt ~f: (fun e -> e == exp) || loop e
1465+ | Pcl_fun (param , e ) -> check_function_param param || loop e
14671466 | Pcl_constr _ -> false
14681467 | Pcl_structure _ -> false
14691468 | Pcl_apply (_ , l ) -> List. exists l ~f: (fun (_ , e ) -> e == exp)
@@ -2068,7 +2067,7 @@ end = struct
20682067 let exp = snd (List. last_exn args) in
20692068 (not (parenze_exp (sub_exp ~ctx: (Cl cl) exp)))
20702069 && exposed_right_exp cls exp
2071- | Pcl_fun (_ , _ , _ , e ) ->
2070+ | Pcl_fun (_ , e ) ->
20722071 (not (parenze_cl (sub_cl ~ctx: (Cl cl) e)))
20732072 && exposed_right_cl cls e
20742073 | _ -> false
0 commit comments