@@ -26,11 +26,12 @@ module TypeError = struct
2626 * UnsizedType .t list
2727 * (UnsizedType .autodifftype * UnsizedType .t ) list
2828 * SignatureMismatch .function_mismatch
29- | IllTypedVariadicODE of
29+ | IllTypedVariadicDE of
3030 string
3131 * UnsizedType .t list
3232 * (UnsizedType .autodifftype * UnsizedType .t ) list
3333 * SignatureMismatch .function_mismatch
34+ * UnsizedType .t
3435 | ReturningFnExpectedNonReturningFound of string
3536 | ReturningFnExpectedNonFnFound of string
3637 | ReturningFnExpectedUndeclaredIdentFound of string * string option
@@ -125,15 +126,11 @@ module TypeError = struct
125126 | IllTypedReduceSumGeneric (name , arg_tys , expected_args , error ) ->
126127 SignatureMismatch. pp_signature_mismatch ppf
127128 (name, arg_tys, ([((ReturnType UReal , expected_args), error)], false ))
128- | IllTypedVariadicODE (name , arg_tys , args , error ) ->
129+ | IllTypedVariadicDE (name , arg_tys , args , error , return_type ) ->
129130 SignatureMismatch. pp_signature_mismatch ppf
130131 ( name
131132 , arg_tys
132- , ( [ ( ( UnsizedType. ReturnType
133- Stan_math_signatures. variadic_ode_fun_return_type
134- , args )
135- , error ) ]
136- , false ) )
133+ , ([((UnsizedType. ReturnType return_type, args), error)], false ) )
137134 | NotIndexable (ut , nidcs ) ->
138135 Fmt. pf ppf
139136 " Too many indexes, expression dimensions=%d, indexes found=%d."
@@ -518,7 +515,24 @@ let illtyped_reduce_sum_generic loc name arg_tys expected_args error =
518515 )
519516
520517let illtyped_variadic_ode loc name arg_tys args error =
521- TypeError (loc, TypeError. IllTypedVariadicODE (name, arg_tys, args, error))
518+ TypeError
519+ ( loc
520+ , TypeError. IllTypedVariadicDE
521+ ( name
522+ , arg_tys
523+ , args
524+ , error
525+ , Stan_math_signatures. variadic_ode_fun_return_type ) )
526+
527+ let illtyped_variadic_dae loc name arg_tys args error =
528+ TypeError
529+ ( loc
530+ , TypeError. IllTypedVariadicDE
531+ ( name
532+ , arg_tys
533+ , args
534+ , error
535+ , Stan_math_signatures. variadic_dae_fun_return_type ) )
522536
523537let returning_fn_expected_nonfn_found loc name =
524538 TypeError (loc, TypeError. ReturningFnExpectedNonFnFound name)
0 commit comments