Textual.ProcSig
type t =
| Hack of {
qualified_name : QualifiedProcName.t;
arity : int option;
}
Hack doesn't support function overloading but it does support functions with default arguments. This means that a procedure is uniquely identified by its name and the number of arguments.
*)| Python of {
qualified_name : QualifiedProcName.t;
arity : int option;
}
Python supports function overloading and default arguments. This means that a procedure is uniquely identified by its name and the number of arguments.
*)| Other of {
qualified_name : QualifiedProcName.t;
}
Catch-all case for languages that currently lack support for function overloading at the Textual level.
For instance, in C++ and Java the signature consists of a procedure name and types of formals. However, the syntax of procedure calls in Textual doesn't give us the types of formals and inferring them from the types of arguments would be brittle. We should extend the syntax of Textual to allow unambiguous call target resolution when we need to add support for other languages.
*)Signature uniquely identifies a called procedure in a target language.
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val pp : Ppx_show_runtime.Format.formatter -> t -> unit
val show : t -> string
val to_qualified_procname : t -> QualifiedProcName.t
val arity : t -> int option
val is_hack_init : t -> bool