Skip to content

Commit

Permalink
Fix partial function error on lambda comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
euisuny committed Jan 12, 2024
1 parent a86cabf commit 8813452
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions middle_end/flambda2/validate/equiv.ml
Original file line number Diff line number Diff line change
Expand Up @@ -417,8 +417,11 @@ and equiv_cont _env (e1 : Continuation.t) (e2 : Continuation.t) : eq =
| (Normal_or_exn | Return | Define_root_symbol | Toplevel_return), _ -> false

and equiv_lambda env (e1 : lambda_expr) (e2 : lambda_expr) : eq =
Core_lambda.pattern_match_pair e1 e2
~f:(fun
let l1 = Core_lambda.pattern_match e1 ~f:(fun b _ -> Bound_parameters.arity b.params) in
let l2 = Core_lambda.pattern_match e2 ~f:(fun b _ -> Bound_parameters.arity b.params) in
if l1 <> l2 then false
else
Core_lambda.pattern_match_pair e1 e2 ~f:(fun
~return_continuation:_ ~exn_continuation:_ _params e1 e2 ->
equiv env e1 e2)

Expand Down

0 comments on commit 8813452

Please sign in to comment.