Mdx.BlockCode blocks headers.
module Header : sig ... endCode blocks.
type ocaml_value = {env : Ocaml_env.t;env is the name given to the environment where tests are run.
non_det : Label.non_det option;errors : Output.t list;}type toplevel_value = {env : Ocaml_env.t;env is the name given to the environment where tests are run.
non_det : Label.non_det option;}type include_value = {file_included : string;file_included is the name of the file to synchronize with.
file_kind : include_file_kind;}type value = | Raw of raw_value| OCaml of ocaml_value| Cram of cram_value| Toplevel of toplevel_value| Include of include_valueThe type for block values.
type t = {loc : Location.t;section : section option;dir : string option;source_trees : string list;required_packages : string list;labels : Label.t list;legacy_labels : bool;contents : string list;skip : bool;version_enabled : bool;Whether the current OCaml version complies with the block's version.
*)set_variables : (string * string) list;unset_variables : string list;value : value;}The type for supported code blocks.
val mk_include :
loc:Location.t ->
section:section option ->
labels:Label.t list ->
(t, [ `Msg of string ]) Result.resultmk_include builds an include block from a comment <!-- $MDX ... --> that is not followed by a code block ``` ... ```.
pp_header pretty-prints full block headers with the labels.
pp_footer pretty-prints block footer.
val pp_line_directive : (string * int) Fmt.tpp_line_directive pretty-prints a line directive given as a filename and line number.
val non_det : t -> Label.non_det optionWhether a block's command or output is non-deterministic.
val directory : t -> string optiondirectory t is the directory where t tests should be run.
val source_trees : t -> string listsource_trees t is the list of extra source-trees to add as dependency of the code-block.
val file : t -> string optionfile t is the name of the file to synchronize t with.
val set_variables : t -> (string * string) listset_variable t is the list of environment variable to set and their values
val unset_variables : t -> string listunset_variable t is the list of environment variable to unset
val explicit_required_packages : t -> string listexplicit_required_packages t returns the list of packages explicitly required by the user through require-package labels in the block t.
val required_libraries : t -> (Library.Set.t, string) Result.resultrequired_libraries t returns the set of libaries that are loaded through #require statements in the block t. Always returns an empty set if t isn't a toplevel block.
val skip : t -> boolskip t is true iff skip is in the labels of t.
executable_contents t is either t's contents if t is a raw or a cram block, or t's commands if t is a toplevel fragments (e.g. the phrase result is discarded).
val is_active : ?section:string -> t -> boolval require_from_line : string -> (Library.Set.t, string) Result.resultrequire_from_line line returns the set of libraries imported by the #require statement on line or an empty set if line is not a require statement.
val require_from_lines : string list -> (Library.Set.t, string) Result.resultSame as require_from_line but aggregated over several lines