Frontend.SignatureMismatchtype type_mismatch = private | DataOnlyError| TypeMismatch of Middle.UnsizedType.t
* Middle.UnsizedType.t
* details Core.optionand details = | SuffixMismatch of Core.unit Middle.Fun_kind.suffix
* Core.unit Middle.Fun_kind.suffix| ReturnTypeMismatch of Middle.UnsizedType.returntype
* Middle.UnsizedType.returntype| InputMismatch of function_mismatchand function_mismatch = private | ArgError of Core.int * type_mismatch| ArgNumMismatch of Core.int * Core.inttype signature_error =
(Middle.UnsizedType.returntype
* Middle.UnsizedType.argumentlist
* Middle.Location_span.t Core.option)
* function_mismatchtype ('unique, 'error) generic_match_result = | UniqueMatch of 'unique| AmbiguousMatch of (Middle.UnsizedType.returntype
* Middle.UnsizedType.argumentlist
* Middle.Location_span.t Core.option)
Core.list| SignatureErrors of 'errortype match_result =
(Middle.UnsizedType.returntype
* (Core.bool Middle.Fun_kind.suffix ->
Ast.fun_kind)
* Promotion.t Core.list
* Middle.Location_span.t Core.option,
signature_error Core.list * Core.bool)
generic_match_resultThe match result for general (non-variadic) functions
val check_of_same_type_mod_conv :
Middle.UnsizedType.t ->
Middle.UnsizedType.t ->
(Promotion.t, type_mismatch) Core.resultval check_compatible_arguments_mod_conv :
Middle.UnsizedType.argumentlist ->
Middle.UnsizedType.argumentlist ->
(Promotion.t Core.list, function_mismatch) Core.resultval check_compatible_arguments_no_promotion :
Middle.UnsizedType.argumentlist ->
Middle.UnsizedType.argumentlist ->
(Core.unit, function_mismatch) Core.resultval unique_minimum_promotion :
('a * Promotion.t Core.list) Core.list ->
('a * Promotion.t Core.list, 'a Core.list Core.option) Core.resultval matching_function :
Environment.t ->
Core.string ->
Middle.UnsizedType.argumentlist ->
match_resultSearches for a function of the given name which can support the required argument types. Requires a unique minimum option under type promotion
val matching_stanlib_function :
Core.string ->
Middle.UnsizedType.argumentlist ->
match_resultSame as matching_function but requires specifically that the function be from StanMath (uses Environment.stan_math_environment)
val check_variadic_args :
allow_lpdf:Core.bool ->
Middle.UnsizedType.argumentlist ->
Middle.UnsizedType.argumentlist ->
Middle.Location_span.t Core.option ->
Middle.UnsizedType.t ->
Middle.UnsizedType.argumentlist ->
((Middle.UnsizedType.t * Middle.Location_span.t Core.option)
* Promotion.t Core.list,
Middle.UnsizedType.argumentlist
* function_mismatch
* Middle.Location_span.t Core.option)
Core.resultCheck variadic function arguments. If a match is found, returns Ok of the function type and a list of promotions (see promote) If none is found, returns Error of the list of args and a function_mismatch.
val data_only_msg : Core.unit Fmt.tval arguments : Core.int Fmt.tFormatter for "arguments" with correct pluralization
val quoted : Core.string Fmt.tFormatter for quoting a string
val pp_mismatch_details :
skipped:Core.string Core.list ->
Core.Format.formatter ->
details ->
Core.unitval pp_signature_mismatch :
Core.Format.formatter ->
(Core.string
* Middle.UnsizedType.t Core.list
* (signature_error Core.list * Core.bool)) ->
Core.unitval list_valid_assignmentoperator_rhs :
Middle.UnsizedType.t ->
Middle.Operator.t ->
Middle.UnsizedType.t Core.listval compare_errors : function_mismatch -> function_mismatch -> Core.intval compare_match_results : match_result -> match_result -> Core.int