diff --git a/src/frontend/Canonicalize.ml b/src/frontend/Canonicalize.ml index 3feca5b429..d72d73d634 100644 --- a/src/frontend/Canonicalize.ml +++ b/src/frontend/Canonicalize.ml @@ -3,11 +3,7 @@ open Ast open Deprecation_analysis type canonicalizer_settings = - { deprecations: bool - ; parentheses: bool - ; braces: bool - ; (* TODO: NYI. Really for the pretty printer but it makes sense to live here *) - inline_includes: bool } + {deprecations: bool; parentheses: bool; braces: bool; inline_includes: bool} let all = {deprecations= true; parentheses= true; inline_includes= true; braces= true} diff --git a/src/middle/Stan_math_signatures.ml b/src/middle/Stan_math_signatures.ml index f28bd60739..a54e970c78 100644 --- a/src/middle/Stan_math_signatures.ml +++ b/src/middle/Stan_math_signatures.ml @@ -1115,7 +1115,6 @@ let () = add_unqualified ("distance", ReturnType UReal, [URowVector; URowVector], SoA) ; add_unqualified ("distance", ReturnType UReal, [UVector; URowVector], SoA) ; add_unqualified ("distance", ReturnType UReal, [URowVector; UVector], SoA) ; - add_unqualified ("divide", ReturnType UComplex, [UComplex; UReal], AoS) ; add_unqualified ("divide", ReturnType UComplex, [UComplex; UComplex], AoS) ; add_unqualified ("divide", ReturnType UInt, [UInt; UInt], SoA) ; add_unqualified ("divide", ReturnType UReal, [UReal; UReal], SoA) ; @@ -1668,7 +1667,6 @@ let () = ("multinomial_logit_rng", ReturnType (UArray UInt), [UVector; UInt], AoS) ; add_unqualified ("multinomial_rng", ReturnType (UArray UInt), [UVector; UInt], AoS) ; - add_unqualified ("multiply", ReturnType UComplex, [UComplex; UReal], AoS) ; add_unqualified ("multiply", ReturnType UComplex, [UComplex; UComplex], AoS) ; add_unqualified ("multiply", ReturnType UInt, [UInt; UInt], SoA) ; add_unqualified ("multiply", ReturnType UReal, [UReal; UReal], SoA) ; @@ -2058,15 +2056,8 @@ let () = add_unqualified ("sub_row", ReturnType URowVector, [UMatrix; UInt; UInt; UInt], SoA) ; List.iter - ~f:(fun i -> - add_unqualified - ( "subtract" - , ReturnType (List.nth_exn bare_types i) - , [List.nth_exn bare_types i; List.nth_exn bare_types i] - , SoA ) ) - (List.range 0 bare_types_size) ; - add_unqualified ("subtract", ReturnType UComplex, [UComplex; UReal], AoS) ; - add_unqualified ("subtract", ReturnType UComplex, [UComplex; UComplex], AoS) ; + ~f:(fun x -> add_unqualified ("subtract", ReturnType x, [x; x], SoA)) + bare_types ; add_unqualified ("subtract", ReturnType UVector, [UVector; UReal], SoA) ; add_unqualified ("subtract", ReturnType URowVector, [URowVector; UReal], SoA) ; add_unqualified ("subtract", ReturnType UMatrix, [UMatrix; UReal], SoA) ; diff --git a/test/integration/bad/compound-assign/stanc.expected b/test/integration/bad/compound-assign/stanc.expected index ca88653c71..4a0c8c8414 100644 --- a/test/integration/bad/compound-assign/stanc.expected +++ b/test/integration/bad/compound-assign/stanc.expected @@ -324,8 +324,6 @@ Ill-typed arguments supplied to assignment operator *=: lhs has type row_vector (real, real) => void (vector, int) => void (vector, real) => void -(complex, int) => void -(complex, real) => void (complex, complex) => void (row_vector, int) => void (row_vector, real) => void diff --git a/test/integration/bad/stanc.expected b/test/integration/bad/stanc.expected index 6369268e86..46fc11284d 100644 --- a/test/integration/bad/stanc.expected +++ b/test/integration/bad/stanc.expected @@ -765,8 +765,6 @@ Ill-typed arguments supplied to infix operator -. Available signatures: (real, vector) => vector (vector, real) => vector (vector, vector) => vector -(complex, real) => complex -(complex, complex) => complex (complex, complex) => complex (real, row_vector) => row_vector (row_vector, real) => row_vector @@ -1493,7 +1491,6 @@ Ill-typed arguments supplied to infix operator /. Available signatures: (int, int) => int (real, real) => real (vector, real) => vector -(complex, real) => complex (complex, complex) => complex (row_vector, real) => row_vector (matrix, real) => matrix @@ -1515,7 +1512,6 @@ Ill-typed arguments supplied to infix operator /. Available signatures: (int, int) => int (real, real) => real (vector, real) => vector -(complex, real) => complex (complex, complex) => complex (row_vector, real) => row_vector (matrix, real) => matrix @@ -1691,7 +1687,6 @@ Ill-typed arguments supplied to infix operator *. Available signatures: (real, vector) => vector (vector, real) => vector (matrix, vector) => vector -(complex, real) => complex (complex, complex) => complex (real, row_vector) => row_vector (row_vector, real) => row_vector @@ -1717,8 +1712,6 @@ Ill-typed arguments supplied to infix operator -. Available signatures: (real, vector) => vector (vector, real) => vector (vector, vector) => vector -(complex, real) => complex -(complex, complex) => complex (complex, complex) => complex (real, row_vector) => row_vector (row_vector, real) => row_vector diff --git a/test/integration/signatures/stan_math_signatures.t b/test/integration/signatures/stan_math_signatures.t index 60804fbf48..15452b7064 100644 --- a/test/integration/signatures/stan_math_signatures.t +++ b/test/integration/signatures/stan_math_signatures.t @@ -3917,7 +3917,6 @@ Display all Stan math signatures exposed in the language divide(int, int) => int divide(real, real) => real divide(vector, real) => vector - divide(complex, real) => complex divide(complex, complex) => complex divide(row_vector, real) => row_vector divide(matrix, real) => matrix @@ -14517,7 +14516,6 @@ Display all Stan math signatures exposed in the language multiply(real, vector) => vector multiply(vector, real) => vector multiply(matrix, vector) => vector - multiply(complex, real) => complex multiply(complex, complex) => complex multiply(real, row_vector) => row_vector multiply(row_vector, real) => row_vector @@ -26164,8 +26162,6 @@ Display all Stan math signatures exposed in the language subtract(real, vector) => vector subtract(vector, real) => vector subtract(vector, vector) => vector - subtract(complex, real) => complex - subtract(complex, complex) => complex subtract(complex, complex) => complex subtract(real, row_vector) => row_vector subtract(row_vector, real) => row_vector