Library
Module
Module type
Parameter
Class
Class type
Code blocks.
type value =
| Raw
| OCaml
| Error of string list
| Cram of {
pad : int;
tests : Cram.t list;
}
| Toplevel of Toplevel.t list
The type for block values.
type t = {
line : int;
file : string;
section : section option;
labels : (string * string option) list;
header : string option;
contents : string list;
value : value;
}
The type for supported code blocks.
pp_footer
pretty-prints block footer.
val pp_line_directive : (string * int) Fmt.t
pp_line_directive
pretty-prints a line directive given as a filename and line number.
val mode : t -> [ `Non_det of [ `Command | `Output ] | `Normal ]
mode t
is t
's mode.
val directory : t -> string option
directory t
is the directory where t
tests should be run.
val header : t -> string option
header t
is t
's header.
val executable_contents : t -> string list
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).
eval t
is the same as t
but with it's value replaced by either Cram
or Toplevel
blocks, depending on t
's header.