command ]]>

Evaluate the given OCaml code and return its output. See examples in and .

If given, the session is executed in this directory, else the session is executed in the current working directory. Note that if the session already exists, its directory is not changed so you only have to specify the directory once, for the first use of a session with ocaml-eval. If given and in-xml-block is true, the given id is given to the root XML element of the result. Embed code and result in XML elements, except if set to false By default, an error in evaluation of the given code will raise an error. Setting this option to false will result is having the error message in the result of the rule. This is useful to provide examples of errors in a documentation. Warning and error locations are shown using classes. Set this option to false to prevent adding such classes. Specify whether to print warning and error locations or not. If highlight-locs is true, then default value of print-locs is false, else it is true. Specify the name of the OCaml session to use to evaluate the given code. If no name is specified, the default session is used. Else, if the given session does not exist yet, it is created, eventually using the given directory option. This allows to evaluate OCaml code in different contexts, to prevent poluting a session's environment. Set to false not to have the original code in the result of the rule. Default is true if the toplevel option is true, else false. Set to false not to have the output of the code in the result of the rule. Note that stderr is only kept in case of error in toplevel mode. Set to true to enable toplevel-like output for the rule. This includes a prompt before the code and the result of evaluation (types, values, ...).