Commit 746206c
authored
feat: hover information for
This PR implements hover information for `grind` anchors. Anchors are
stable hash codes for referencing terms in the grind state. The anchors
will be used when auto generating tactic scripts. The hover display the
following information:
1- In the `instantiate` tactic, it displays the type of the theorem
being instantiated.
<img width="952" height="125" alt="image"
src="https://github.com/user-attachments/assets/be949b87-cf9b-4f75-abe0-17751295de93"
/>
2- In the `cases` tactic, the hover information depends on the kind of
case-split.
a) Proposition
<img width="1019" height="125" alt="image"
src="https://github.com/user-attachments/assets/253e2927-f18e-49ab-a8fc-2144657406d8"
/>
b) A hypotheses. In this case, you can opt to replace the anchor with
the hypothesis' name if it is accessible.
<img width="1019" height="178" alt="image"
src="https://github.com/user-attachments/assets/858b3751-4ef9-492d-a42f-c0743753a7de"
/>
c) A term. The hover displays just the type, by `grind` logs a silent
information with additional information
<img width="1376" height="148" alt="image"
src="https://github.com/user-attachments/assets/30078ca4-a886-49d9-912e-866f3567b0da"
/>grind anchors (#10779)1 parent 88141a0 commit 746206c
File tree
2 files changed
+47
-6
lines changed- src/Lean/Elab/Tactic/Grind
- tests/lean/run
2 files changed
+47
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
107 | 111 | | |
108 | 112 | | |
109 | 113 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
| 142 | + | |
| 143 | + | |
139 | 144 | | |
140 | 145 | | |
141 | 146 | | |
142 | 147 | | |
143 | | - | |
| 148 | + | |
144 | 149 | | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
145 | 154 | | |
146 | 155 | | |
147 | | - | |
| 156 | + | |
148 | 157 | | |
149 | 158 | | |
150 | | - | |
| 159 | + | |
151 | 160 | | |
152 | 161 | | |
153 | 162 | | |
| |||
214 | 223 | | |
215 | 224 | | |
216 | 225 | | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
217 | 251 | | |
218 | 252 | | |
219 | 253 | | |
220 | 254 | | |
221 | 255 | | |
222 | 256 | | |
223 | | - | |
| 257 | + | |
224 | 258 | | |
| 259 | + | |
225 | 260 | | |
226 | 261 | | |
227 | 262 | | |
228 | 263 | | |
229 | | - | |
| 264 | + | |
230 | 265 | | |
| 266 | + | |
231 | 267 | | |
232 | 268 | | |
233 | 269 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
417 | 422 | | |
418 | 423 | | |
419 | 424 | | |
| |||
0 commit comments