Cpp.DSL
A set of operators and helpers to make the OCaml code look more like the resultant C++
Some operators to make streams and method calls look more like the resultant C++
include module type of struct include Exprs end
val method_call : expr -> identifier -> type_ list -> expr list -> expr
Call a method on object, wrapping it in parentheses if it is not a variable
val to_var : identifier -> expr
val literal_string : string -> expr
Turn an OCaml string into a quoted and escaped C++ string
val fun_call : identifier -> expr list -> expr
val templated_fun_call : identifier -> type_ list -> expr list -> expr
val quiet_NaN : expr
Helper for std::numeric_limits<double>::quiet_NaN()
val int_min : expr
Helper for std::numeric_limits<int>::min()
val (.@!()) : expr -> identifier -> expr
Method call: Call a no-argument method
E.g. foo.bar()
val (.@?()) : expr -> (identifier * expr list) -> expr
Method call: Call the named method with args
E.g. foo.bar(A1,...An)
val (.@<>()) : expr -> (identifier * type_ list * expr list) -> expr
Method call: Call the named method with template types and args
E.g. foo.bar<T1,...,Tn>(A1,...An)
val (|::!) : type_ -> identifier -> expr
Static method call: Call the named method with no arguments.
E.g. Foo::bar()
val (|::?) : type_ -> (identifier * expr list) -> expr
Static method call: Call the named method with args
E.g. Foo::bar(A1,...An)
val (|::<>) : type_ -> (identifier * type_ list * expr list) -> expr
Static method call: Call the named method with template types and args
E.g. Foo::bar<T1,...,Tn>(A1,...An)
include module type of struct include Stmts end
Wrap the list of statements in a block if it isn't a singleton block already
Set up the try/catch logic for throwing an exception with its location set to the Stan program location.
val fori : identifier -> expr -> expr -> stmt -> stmt
val unused : identifier -> stmt list
Suppress warnings for a variable which may not be used.
val (:=) : identifier -> expr -> stmt
Shorthand for assignment