Commit 53cb928
committed
fix(lol/abi): make the lol-abi Idris package typecheck
The lol-abi.ipkg package did not build. All failures were in
estate-authored (MPL-2.0) modules; fixed without any believe_me or holes.
Layout.idr:
- Every MkStructLayout left its erased `aligned : Divides alignment
totalSize` auto-implicit to proof search, which cannot guess the
quotient k. Supplied it explicitly per layout via
{aligned = DivideBy k Refl} (32=4*8, 24=3*8, 56=7*8, 40=5*8, 16=4*4).
- paddingFor used `-` on Nat, resolving to a nonexistent `Neg Nat`;
switched to truncating `minus`.
- Removed the unused `alignUpCorrect` lemma: its `Refl` body asserted
`n = (n `div` a) * a`, which only holds definitionally for concrete
args, so it never typechecked. A correct general proof needs the
division theorem (absent from Idris2 base); the divisibility the
concrete layouts need is discharged per-layout by the explicit
DivideBy witnesses. Documented as future work.
I18nStore.idr:
- extractLanguage used Data.List1.split (wants a List) on a String;
switched to Data.String.split.
- LookupError used `data X = .. | ..` with per-constructor `|||` doc
comments (only valid in GADT form); converted to
`data LookupError : Type where`.
- The CorrectStore interface ended with a dangling `|||` doc comment
(no method after it), breaking the block's scope so the following
top-level `data LookupError` failed to register; demoted to a plain
comment.
`idris2 --build lol-abi.ipkg` now exits 0 (pre-existing shadowing
warnings only).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019awZjBD1qx61tvmEuEKNpn1 parent c43aafa commit 53cb928
2 files changed
Lines changed: 37 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
150 | 151 | | |
151 | 152 | | |
152 | 153 | | |
153 | | - | |
| 154 | + | |
154 | 155 | | |
155 | 156 | | |
156 | 157 | | |
| |||
213 | 214 | | |
214 | 215 | | |
215 | 216 | | |
216 | | - | |
217 | | - | |
218 | | - | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
219 | 222 | | |
220 | 223 | | |
221 | 224 | | |
| |||
224 | 227 | | |
225 | 228 | | |
226 | 229 | | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
236 | 239 | | |
237 | 240 | | |
238 | 241 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
54 | 63 | | |
55 | 64 | | |
56 | 65 | | |
| |||
117 | 126 | | |
118 | 127 | | |
119 | 128 | | |
| 129 | + | |
120 | 130 | | |
121 | 131 | | |
122 | 132 | | |
| |||
138 | 148 | | |
139 | 149 | | |
140 | 150 | | |
| 151 | + | |
141 | 152 | | |
142 | 153 | | |
143 | 154 | | |
| |||
167 | 178 | | |
168 | 179 | | |
169 | 180 | | |
| 181 | + | |
170 | 182 | | |
171 | 183 | | |
172 | 184 | | |
| |||
188 | 200 | | |
189 | 201 | | |
190 | 202 | | |
| 203 | + | |
191 | 204 | | |
192 | 205 | | |
193 | 206 | | |
| |||
243 | 256 | | |
244 | 257 | | |
245 | 258 | | |
| 259 | + | |
0 commit comments