Debian Codegraph @

doc/guide/src/ShowBasisDirective.adoc

raw
1 = ShowBasisDirective
2
3 A comment of the form
4 [source,sml]
5 ----
6 (*#showBasis "<file>"*)
7 ----
8 is recognized as a directive to save the current basis (i.e., environment) to
9 `<file>` (in the same format as the `-show-basis <file>` <<CompileTimeOptions#,
10 compile-time option>>). The `<file>` is interpreted relative to the source file
11 in which it appears. The comment is lexed as a distinct token and is parsed as
12 a structure-level declaration. [Note that treating the directive as a top-level
13 declaration would prohibit using it inside a functor body, which would make the
14 feature significantly less useful in the context of the MLton compiler sources
15 (with its nearly fully functorial style).]
16
17 This feature is meant to facilitate auto-completion via
18 https://github.com/MatthewFluet/company-mlton[`company-mlton`] and similar
19 tools.