Source/Packages

Observe.Declaration

packages/observability/src/Observe/Declaration.alpha

17 lines1 declarations0.8 KiBSHA-256 2c4a2a9e0810

Complete file

Declaration.alpha

Definition view
1module Observe.Declaration
2
3import Observe.Value
4import Std.Natural
5
6-- Compare distinct semantic variants while retaining each declaration's
7-- origin. Unknown/truncated input never chooses the latest arrival as truth.
8-- Codes: absent=0, agreed=1, conflicting=2, invalid=3, unsupported=4,
9-- truncated=5. Negative transport counts are refused before interpretation.
10def aosDeclarationAgreement =
11  (lambda unrestricted variants : Nat . (lambda unrestricted invalid : Nat .
12    (lambda unrestricted unsupported : Nat . (lambda unrestricted truncated : Nat .
13      (aosChoose Nat (naturalNonzero truncated) 5
14        (aosChoose Nat (naturalNonzero invalid) 3
15          (aosChoose Nat (naturalNonzero unsupported) 4
16            (aosChoose Nat (naturalEqual variants 0) 0
17              (aosChoose Nat (naturalEqual variants 1) 1 2)))))))))

The compiler supplied declaration spans and resolved links from this source snapshot. This page does not assert that this file belongs to a checked closure.