Module Merge

module Merge: sig .. end
This module implements the merge operation.

val merge_envs : TypeCore.env ->
?annot:TypeCore.typ ->
TypeCore.env * TypeCore.var ->
TypeCore.env * TypeCore.var -> TypeCore.env * TypeCore.var
When the control-flow diverges, one needs to merge the environments, that is, compute a set of permissions that subsumes the two environments. In order to run, the merge_envs function takes: It returns a merged environment along with a variable that points to the combined return value of the merged environment.

Consider for example "if True then x else y"; the combined return value of the two environments will try to reconcile the permissions available for "x" and "y".