Debian Codegraph @

test/blackbox-tests/test-cases/stanzas/mdx-stanza/preludes.t/README.md

raw symbols SCIP
1 Using the mdx stanza, you can set mdx prelude which are used to evaluate
2 code in the toplevel environments before checking a document. To do that
3 you can set the prelude field of the stanza: `(preludes <prelude_file> ...)`.
4
5 ```ocaml
6 # x;;
7 - : int = 1
8 ```
9
10 Different environment can have their own prelude. This is set using the
11 `(env <env_name> <prelude_file>)` syntax for the prelude field.
12 Here x and why are set in `alt.ml`.
13
14 ```ocaml env=a
15 # x + y;;
16 - : int = 11
17 ```
18
19 ```ocaml env=b
20 # x + y;;
21 - : int = 21
22 ```