jon.recoil.org

Module Flambda2_simplify.Continuation_uses_env

type t
include Flambda2_simplify.Continuation_uses_env_intf.S with type t := Flambda2_simplify.Continuation_uses_env.t

We don't have an interface that insists on adding continuations before seeing their uses. This would be problematic when inserting wrappers, where we have already advanced past the point at which such wrappers would need to be defined, before knowing that a wrapper is needed.

Manually add a continuation use, with everything specified, including the id for the apply_cont (contrary to record_continuation_uses which always generates a fresh id). Users of this function must take care to ensure there's only one use per id.