As discussed in #1146, the function code generation has gotten really messy. This PR doesn't fix that, but it does move it into it's own file behind a very simple interface:
val pp_functions_functors : Format.formatter -> Program.Numbered.t -> unit
(** Pretty-print all user defined functions. Creates functor structs as needed
*)
val pp_standalone_fun_def :
string -> Format.formatter -> 'a Program.fun_def -> unit
(** Creates functions outside the model namespaces which only call the ones
inside the namespaces *)
This PR changes no code, just where it is located. Hopefully it will make it easier for @SteveBronder or I to tackle the larger refactoring in the near future.
@rok-cesnovar just as an FYI, this is fine if it gets merged before the patch, it's just cut/pasting code into different files for organizational reasons and doesn't need a release note.
As discussed in #1146, the function code generation has gotten really messy. This PR doesn't fix that, but it does move it into it's own file behind a very simple interface:
This PR changes no code, just where it is located. Hopefully it will make it easier for @SteveBronder or I to tackle the larger refactoring in the near future.
Submission Checklist
Release notes
Reorganize code gen modules
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)