Module Driver.Entry

The main entrypoint for Stan -> C++ compilation

type compilation_result = (string, Frontend.Errors.t) Stdlib.result

Either the C++ a model compiled to, or an error

type other_output =
  1. | Formatted of string
  2. | DebugOutput of string
  3. | Memory_patterns of string
  4. | Info of string
  5. | Version of string
  6. | Generated of string
  7. | Warnings of Frontend.Warnings.t list

The type of all non-C++-code outputs from the compiler

val stan2cpp : string -> [ `Code of string | `File of string ] -> Flags.t -> (other_output -> unit) -> compilation_result

The main function of the compiler. Takes in the model's name, the model code, compiler settings, and a callback for all non-C++ output