Commit c94e38a
committed
Fix DyadicEchoBridge universe error and wire in Dyadic
Three defects kept this file from typechecking:
1. Lines 29-32, 42: the body `Echo (λ _ → ⊤) ⊤` conflated the unit
*type* (⊤ : Set) with the unit *value* (tt : ⊤). Echo expects a
function A → B and a value y : B, not a function into Set. Changed
to `Echo {A = ⊤} (λ _ → tt) tt` — pinning A explicitly because the
inferred source type is not constrained anywhere else.
2. ProtocolProvenance pattern-matched on a SessionEcho input whose
type depends on the Session constructor. The End case has type ⊤,
not Echo, so the single-clause catch-all "ProtocolProvenance echo
= echo" could not typecheck. Split into five clauses, synthesising
a canonical Echo in the End case via echo-intro.
3. ProvenancePreservation returned the left echo verbatim, but its
type was SessionEcho at (S1 >>= S2) rather than at S1. Pattern-
match on S1 and synthesise a fresh canonical echo at the
concatenated head; pass the right-hand echo through when S1 = End.
Also wired Dyadic + DyadicEchoBridge into All.agda so they join the
verified suite and cannot silently regress again.
https://claude.ai/code/session_01JRLz84fAaWvRBKyXuc4tyK1 parent 9b8695d commit c94e38a
2 files changed
Lines changed: 28 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
42 | 48 | | |
43 | 49 | | |
44 | 50 | | |
| |||
50 | 56 | | |
51 | 57 | | |
52 | 58 | | |
53 | | - | |
| 59 | + | |
54 | 60 | | |
55 | | - | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
56 | 65 | | |
57 | 66 | | |
58 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
59 | 72 | | |
60 | 73 | | |
61 | 74 | | |
| |||
0 commit comments