@@ -186,7 +186,7 @@ let concat (t1 : t) (t2 : t) =
186
186
symbol_projections;
187
187
}
188
188
189
- let join_types ~env_at_fork envs_with_levels ~ extra_lifted_consts_in_use_envs =
189
+ let join_types ~env_at_fork envs_with_levels =
190
190
(* Add all the variables defined by the branches as existentials to the
191
191
[env_at_fork].
192
192
Any such variable will be given type [Unknown] on a branch where it
@@ -241,17 +241,15 @@ let join_types ~env_at_fork envs_with_levels ~extra_lifted_consts_in_use_envs =
241
241
Name. print name
242
242
Typing_env. print env_at_fork
243
243
end ;
244
- let is_lifted_const_symbol =
245
- match Name. must_be_symbol_opt name with
246
- | None -> false
247
- | Some symbol ->
248
- Symbol.Set. mem symbol extra_lifted_consts_in_use_envs
249
- in
250
244
(* If [name] is that of a lifted constant symbol generated during one
251
245
of the levels, then ignore it. [Simplify_expr] will already have
252
246
made its type suitable for [env_at_fork] and inserted it into that
253
- environment. *)
254
- if is_lifted_const_symbol then None
247
+ environment.
248
+ If [name] is a symbol that is not a lifted constant, then it was
249
+ defined before the fork and already has an equation in env_at_fork.
250
+ While it is possible that its type could be refined by all of the
251
+ branches, it is unlikely. *)
252
+ if Name. is_symbol name then None
255
253
else
256
254
let joined_ty =
257
255
match joined_ty, use_ty with
@@ -426,7 +424,7 @@ let join ~env_at_fork envs_with_levels ~params
426
424
~extra_lifted_consts_in_use_envs ;
427
425
(* Calculate the joined types of all the names involved. *)
428
426
let joined_types =
429
- join_types ~env_at_fork envs_with_levels ~extra_lifted_consts_in_use_envs
427
+ join_types ~env_at_fork envs_with_levels
430
428
in
431
429
(* Next calculate which equations (describing joined types) to propagate to
432
430
the join point. (Recall that the environment at the fork point includes
0 commit comments