Rather than using functors, this just makes it so the include_paths variable in the Preprocessor now looks like
type include_provider_t =
| FileSystemPaths of string list
| InMemory of string String.Map.t
val include_provider : include_provider_t ref
And this is used in the preprocessor to switch between the two styles.
Submission Checklist
[x] Run unit tests
Documentation
[ ] If a user-facing facing change was made, the documentation PR is here:
[x] OR, no user-facing changes were made
Release notes
stanc.js can now accept models which contain #include statements. A fourth argument is available on the javascript stanc function which must be either undefined or a object mapping included file names to Stan source code as strings.
Alternative to #1432, also closes #1430
Rather than using functors, this just makes it so the
include_paths
variable in the Preprocessor now looks likeAnd this is used in the preprocessor to switch between the two styles.
Submission Checklist
Release notes
stanc.js
can now accept models which contain#include
statements. A fourth argument is available on the javascript stanc function which must be eitherundefined
or a object mapping included file names to Stan source code as strings.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)