Skip to main content

Module conform

Module conform 

Source
Expand description

Checking that the proofs of one proposition agree.

A proposition with several proofs is only useful if they all prove the same thing. The type system gets part of the way — every proof is held to the signature at the boundary — but a signature says what shape comes back, not what is in it. sort and reverse have the same type.

So the rest is done by running them against the same inputs and comparing. Where an expected answer is given, every proof is held to it; where none is, the proofs are held to each other, which catches a disagreement without anyone having to know which side is right.

§What is being compared

Values, not text. Two encoders that write the same number differently, or the same object with its keys in a different order, agree — and would look like they disagreed if this compared what they printed.

Structs§

Case
How one case went.
Report
How a whole suite went.
Suite
A set of cases for one proposition.
Vector
One case: what to pass, and what should come back.

Enums§

Answer
What became of one proof on one case.
ConformError
Why a suite could not be run.

Constants§

SUITE_VERSION
The vector-file format this build reads.

Functions§

alike
Whether two values say the same thing.
run
Runs every proof of a proposition against every case.