Skip to main content

Module protocol

Module protocol 

Source
Expand description

Version 1 of the docattest adapter protocol as this adapter speaks it: the data types of the schemas in protocol/schema/ (types) and the loop that reads requests and writes responses (server).

Structs§

Adapter
What a language gives the server to serve.
AdapterName
An adapter’s name and version.
Attestation
Any of the four kinds of attestation, with the fields symbols reads of each.
Cases
A CasesAttestation: a table run row by row by a runner of the setup module.
CasesRow
One row of a cases table.
Declared
A test, or something that may be cited by mistake for one, that a test file declares.
Diagnostic
A reason an example does not compile.
DocProse
One doc comment as prose, with its first and last line.
Evaluation
The outcome of evaluating one fact expression.
Example
An ExampleAttestation: a fenced block, or an example in a doc comment.
ExpressionShape
A fact expression with its names taken out.
Fact
A FactAttestation, as far as the adapter reads it: an expression over a surface.
Hello
The greeting: what is fixed for an adapter, whatever the project.
Observable
A value a surface offers, with the fact expression that reads it.
Observation
A value as the runtime observed it.
SourceFiles
Globs for the project paths that are source files of the language.
SourceText
A file by path and text, as the questions about text receive it.
SymbolRef
A surface symbol an attestation exercises.
Verdict
The verdict on one example, or on one row of a cases table.
Vocabulary
The language’s words for what the core’s sentences name.

Enums§

Capability
A method beyond the required ones that an adapter answers.
Error
Why a request has no result.
Kind
What kind of attestation a verdict is on.
Status
How an attestation fared.

Constants§

VERSION
The protocol number this adapter speaks: the core’s own, since the adapter is built with the core it runs with.

Traits§

Session
The one project open creates.

Functions§

decode
Reads a method’s params; params of the wrong shape are the core’s mistake.
serve
Answers the requests on input until it ends; it then writes the answers still in flight and closes the session.

Type Aliases§

Answer
The answer to one request.