jon.recoil.org

Module Flambda2_terms.Call_kind

Classification of application expressions.

module Function_call : sig ... end
module Method_kind : sig ... end
module Effect : sig ... end

Algebraic effect operations. The corresponding Apply_expr will have the callee set to None and an empty argument list for these. This is done to ensure there is no confusion between the different Simples.

type t = private
  1. | Function of {
    1. function_call : Function_call.t;
    }
  2. | Method of {
    1. kind : Method_kind.t;
    2. obj : Flambda2_term_basics.Simple.t;
    }
  3. | C_call of {
    1. needs_caml_c_call : bool;
    2. is_c_builtin : bool;
    3. effects : Effects.t;
    4. coeffects : Coeffects.t;
    }
  4. | Effect of Effect.t

Whether an application expression corresponds to an OCaml function invocation, an OCaml method invocation, or an external call.

include Expr_std.S with type t := t
val print : Format.formatter -> t -> unit
include Flambda2_nominal.Contains_names.S with type t := t

Compute the free names of a term. Such computation covers all kinds of bindable names (variables, continuations, ...)

val apply_renaming : t -> Flambda2_nominal.Renaming.t -> t

Apply a renaming throughout a term.

include Flambda2_nominal.Contains_ids.S with type t := t
val ids_for_export : t -> Flambda2_nominal.Ids_for_export.t

Gather all table identifiers to export them.

val direct_function_call : Flambda2_identifiers.Code_id.t -> t
val indirect_function_call_unknown_arity : t
val indirect_function_call_known_arity : code_ids:Flambda2_identifiers.Code_id.Set.t Flambda2_lattices.Or_unknown.t -> t
val method_call : Method_kind.t -> obj:Flambda2_term_basics.Simple.t -> t
val c_call : needs_caml_c_call:bool -> is_c_builtin:bool -> effects:Effects.t -> coeffects:Coeffects.t -> t
val effect_ : Effect.t -> t