Commit 9626ac1
authored
proofs(idris2): make Filesystem.Model typecheck under Idris2 0.8.0 (#69)
The model used Data.List.lookup, elem, and (==) on values of type Path
and (Path, FSEntry), and called isJust on Maybe values, without bringing
the required Eq instances or the Data.Maybe import into scope. As a
result Filesystem.Model.idr failed to type-check at lines 103/108/135/
152/169, blocking the entire proofs/idris2/ build tree.
Fix the type errors directly:
* Import Data.Maybe so isJust resolves at line 103.
* Add a public-export Eq Path instance defined by structural pattern
match on the Root/Cons constructors. This sits alongside the existing
DecEq Path instance and satisfies the Eq constraints required by
Data.List.lookup, elem, and the Maybe-equality at line 135.
* Add a public-export Eq FSEntry instance matching on Dir/File, which
satisfies Eq (Path, FSEntry) at line 169 (Idris2 derives Eq on tuples
from Eq on their components automatically).
No theorems are added or modified. The two ?holes at the bottom of the
file (?equivSymProof, ?equivTransProof) are out of scope for this PR
and remain open — they are tractable separately.
Refs #41 (seam-walk pre-existing failure); unblocks future Idris2
proof work and is a prerequisite for adding a build-idris2 Justfile
target + verify-idris2 CI job (separate follow-up).1 parent 9b7c627 commit 9626ac1
1 file changed
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
52 | 60 | | |
53 | 61 | | |
54 | 62 | | |
| |||
78 | 86 | | |
79 | 87 | | |
80 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
81 | 96 | | |
82 | 97 | | |
83 | 98 | | |
| |||
0 commit comments