Module InferIR__ProcnameDispatcher.Call
module FuncArg : sig ... end
Little abstraction over arguments: currently actual args, we'll want formal args later
include Common with type ('context, 'f) dispatcher = 'context -> InferIR.Typ.Procname.t -> FuncArg.t list -> 'f option
type ('context, 'f) matcher
type ('context, 'f) dispatcher
= 'context -> InferIR.Typ.Procname.t -> FuncArg.t list -> 'f option
val make_dispatcher : ('context, 'f) matcher list -> ('context, 'f) dispatcher
Combines matchers to create a dispatcher
val any_typ : ('f, 'f, 'captured_types, 'captured_types, 'markers, 'markers, accept_more) template_arg
Eats a type
val capt_typ : 'marker -> ('marker mtyp -> 'f, 'f, 'captured_types, 'marker mtyp * 'captured_types, 'markers, 'marker * 'markers, accept_more) template_arg
Captures a type than can be back-referenced
val capt_int : (InferStdlib.IStd.Int64.t -> 'f, 'f, 'captured_types, 'captured_types, 'markers, 'markers, accept_more) template_arg
Captures an int
val capt_all : (InferIR.Typ.template_arg list -> 'f, 'f, 'captured_types, 'captured_types, 'markers, 'markers, end_of_list) template_arg
Captures all template args
val (~-) : string -> ('context, 'f, 'f, unit, 'markers, 'markers) name_matcher
Starts a path with a name
val (~+) : ('context -> string -> bool) -> ('context, 'f, 'f, unit, 'markers, 'markers) name_matcher
Starts a path with a matching name that satisfies the given function
val (&+) : ('context, 'f_in, 'f_interm, 'captured_types_in, 'markers_interm, 'markers_out, accept_more) templ_matcher -> ('f_interm, 'f_out, 'captured_types_in, 'captured_types_out, 'markers_in, 'markers_interm, 'lc) template_arg -> ('context, 'f_in, 'f_out, 'captured_types_out, 'markers_in, 'markers_out, 'lc) templ_matcher
Separate template arguments
val (<) : ('context, 'f_in, 'f_interm, 'captured_types_in, 'markers_interm, 'markers_out) name_matcher -> ('f_interm, 'f_out, 'captured_types_in, 'captured_types_out, 'markers_in, 'markers_interm, 'lc) template_arg -> ('context, 'f_in, 'f_out, 'captured_types_out, 'markers_in, 'markers_out, 'lc) templ_matcher
Starts template arguments after a name
val (>::) : ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out, _) templ_matcher -> string -> ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher
Ends template arguments and starts a name
val (&+...>::) : ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out, accept_more) templ_matcher -> string -> ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher
Ends template arguments with eats-ALL and starts a name
val (&::) : ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher -> string -> ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher
Separates names (accepts ALL template arguments on the left one)
val (&::+) : ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher -> ('context -> string -> bool) -> ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher
Separates names that satisfies the given function (accepts ALL template arguments on the left one)
val (<>::) : ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher -> string -> ('context, 'f_in, 'f_out, 'captured_types, 'markers_in, 'markers_out) name_matcher
Separates names (accepts NO template arguments on the left one)
type ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher
type ('context, 'arg_in, 'arg_out, 'f_in, 'f_out, 'captured_types, 'markers) one_arg
val any_arg : ('context, unit, _, 'f, 'f, _, _) one_arg
Eats one arg
val capt_arg : ('context, FuncArg.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg
val capt_exp : ('context, InferIR.Exp.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg expression
val any_arg_of_typ : ('context, unit, _, unit, unit, unit) name_matcher -> ('context, unit, _, 'f, 'f, _, _) one_arg
Eats one arg of the given type
val capt_arg_of_typ : ('context, unit, _, unit, unit, unit) name_matcher -> ('context, FuncArg.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg of the given type
val capt_exp_of_typ : ('context, unit, _, unit, unit, unit) name_matcher -> ('context, InferIR.Exp.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg expression of the given type
val any_arg_of_prim_typ : InferIR.Typ.t -> ('context, unit, _, 'f, 'f, _, _) one_arg
Eats one arg of the given primitive type
val capt_exp_of_prim_typ : InferIR.Typ.t -> ('context, InferIR.Exp.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg expression of the given primitive type
val capt_var_exn : ('context, InferIR.Ident.t, 'wrapped_arg, 'wrapped_arg -> 'f, 'f, _, _) one_arg
Captures one arg Var. Fails with an internal error if the expression is not a Var
val typ1 : 'marker -> ('context, unit, _, 'f, 'f, 'marker mtyp * _, 'marker * _) one_arg
Matches first captured type
val typ2 : 'marker -> ('context, unit, _, 'f, 'f, _ * ('marker mtyp * _), _ * ('marker * _)) one_arg
Matches second captured type
val typ3 : 'marker -> ('context, unit, _, 'f, 'f, _ * (_ * ('marker mtyp * _)), _ * (_ * ('marker * _))) one_arg
Matches third captured type
val ($+) : ('context, 'f_in, 'f_proc_out, 'f_interm, 'captured_types, 'markers) args_matcher -> ('context, 'arg, 'arg, 'f_interm, 'f_out, 'captured_types, 'markers) one_arg -> ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher
Separate function arguments
val ($+?) : ('context, 'f_in, 'f_proc_out, 'f_interm, 'captured_types, 'markers) args_matcher -> ('context, 'arg, 'arg option, 'f_interm, 'f_out, 'captured_types, 'markers) one_arg -> ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher
Add an optional argument
val (>$) : ('context, 'f_in, 'f_proc_out, 'ct, unit, 'cm, _) templ_matcher -> ('context, 'arg, 'arg, 'f_proc_out, 'f_out, 'ct, 'cm) one_arg -> ('context, 'f_in, 'f_proc_out, 'f_out, 'ct, 'cm) args_matcher
Ends template arguments and starts function arguments
val ($-->) : ('context, 'f_in, _, 'f_out, 'captured_types, 'markers) args_matcher -> 'f_in -> ('context, 'f_out) matcher
Ends function arguments, binds the function
val ($) : ('context, 'f_in, 'f_proc_out, 'captured_types, unit, 'markers) name_matcher -> ('context, 'arg, 'arg, 'f_proc_out, 'f_out, 'captured_types, 'markers) one_arg -> ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher
Ends a name with accept-ALL template arguments and starts function arguments
val (<>$) : ('context, 'f_in, 'f_proc_out, 'captured_types, unit, 'markers) name_matcher -> ('context, 'arg, 'arg, 'f_proc_out, 'f_out, 'captured_types, 'markers) one_arg -> ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher
Ends a name with accept-NO template arguments and starts function arguments
val (>-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers, _) templ_matcher -> 'f_in -> ('context, 'f_out) matcher
Ends template arguments, accepts ALL function arguments, binds the function
val ($+...$-->) : ('context, 'f_in, _, 'f_out, 'captured_types, 'markers) args_matcher -> 'f_in -> ('context, 'f_out) matcher
Ends function arguments with eats-ALL and binds the function
val (>$$-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers, _) templ_matcher -> 'f_in -> ('context, 'f_out) matcher
Ends template arguments, accepts NO function arguments, binds the function
val ($$-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers) name_matcher -> 'f_in -> ('context, 'f_out) matcher
After a name, accepts ALL template arguments, accepts NO function arguments, binds the function
val (<>$$-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers) name_matcher -> 'f_in -> ('context, 'f_out) matcher
After a name, accepts NO template arguments, accepts NO function arguments, binds the function
val (&-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers) name_matcher -> 'f_in -> ('context, 'f_out) matcher
After a name, accepts ALL template arguments, accepts ALL function arguments, binds the function
val (<>-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers) name_matcher -> 'f_in -> ('context, 'f_out) matcher
After a name, accepts NO template arguments, accepts ALL function arguments, binds the function
val (&::.*-->) : ('context, 'f_in, 'f_out, 'captured_types, unit, 'markers) name_matcher -> 'f_in -> ('context, 'f_out) matcher
After a name, accepts ALL template arguments, accepts ALL path tails (names, templates), accepts ALL function arguments, binds the function
val ($!-->) : ('context, 'f_in, 'f_proc_out, 'f_out, 'captured_types, 'markers) args_matcher -> 'f_in -> ('context, 'f_out) matcher
Ends function arguments, accepts NO more function arguments. If the args do not match, raise an internal error.