Skip to content

Commit

Permalink
fix compare
Browse files Browse the repository at this point in the history
  • Loading branch information
Gbury committed Nov 22, 2024
1 parent 4501e36 commit 376f390
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions middle_end/flambda2/compare/compare.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,7 @@ and let_cont_exprs env (let_cont1 : Let_cont.t) (let_cont2 : Let_cont.t) :
~free_names_of_body:Unknown))
| Recursive handlers1, Recursive handlers2 ->
let compare_handler_maps env map1 map2 :
Continuation_handler.t Continuation.Map.t Comparison.t =
Continuation_handler.t Continuation.Lmap.t Comparison.t =
lists
~f:(fun env (cont, handler1) (_cont, handler2) ->
cont_handlers env handler1 handler2
Expand All @@ -1292,15 +1292,15 @@ and let_cont_exprs env (let_cont1 : Let_cont.t) (let_cont2 : Let_cont.t) :
|> Comparison.map ~f:(fun handler1' -> cont, handler1'))
~subst:(fun env (cont, handler) -> cont, subst_cont_handler env handler)
~subst_snd:false env
(map1 |> Continuation.Map.bindings)
(map2 |> Continuation.Map.bindings)
|> Comparison.map ~f:Continuation.Map.of_list
(map1 |> Continuation.Lmap.bindings)
(map2 |> Continuation.Lmap.bindings)
|> Comparison.map ~f:Continuation.Lmap.of_list
in
Recursive_let_cont_handlers.pattern_match_pair handlers1 handlers2
~f:(fun ~invariant_params ~body1 ~body2 cont_handlers1 cont_handlers2 ->
pairs ~f1:exprs ~f2:compare_handler_maps
~subst2:(fun env map ->
Continuation.Map.map_sharing (subst_cont_handler env) map)
Continuation.Lmap.map (subst_cont_handler env) map)
env
(body1, cont_handlers1 |> Continuation_handlers.to_map)
(body2, cont_handlers2 |> Continuation_handlers.to_map)
Expand Down

0 comments on commit 376f390

Please sign in to comment.