stan-dev / stanc3

The Stan transpiler (from Stan to C++ and beyond).
BSD 3-Clause "New" or "Revised" License
140 stars 44 forks source link

Make log suffix explicit in declarative distribution signatures #1191

Closed WardBrian closed 2 years ago

WardBrian commented 2 years ago

We currently assume whenever a function has a Lp[md]f signature, it must also have a _log, unless it is a GLM. This creates issues for things like #1188, which want to add new distributions but don't support the deprecated/soon to be removed _log suffix. This change makes it so that Log is explicitly listed as a function type for signatures, so in particular it does not always need to be present.

Submission Checklist

Release notes

Allowed the adding of new distributions without requiring them to support deprecated suffixes.

Copyright and Licensing

By submitting this pull request, the copyright holder is agreeing to license the submitted work under the BSD 3-clause license (https://opensource.org/licenses/BSD-3-Clause)