lean4-htt/src
Kyle Miller 81fe3b6d05
feat: pretty print sorry in "declaration uses 'sorry'" (#10034)
This PR changes the "declaration uses 'sorry'" error to pretty print an
actual `sorry` expression in the message. The effect is that the `sorry`
is hoverable and, if it's labeled, you can "go to definition" to see
where it came from.

The implementation prefers reporting synthetic sorries. These can appear
even if there are no error messages if a declaration refers to a
declaration that has elaboration errors. Users should focus on
elaboration errors before worrying about user-written `sorry`s.

In the future we could have some more precise logic for sorry reporting.
All the sorries in a declaration should be considered to be reported,
and we should not re-report sorries in later declarations. Some
elaborators use `warn.sorry` to avoid re-reporting sorries in auxiliary
declarations.
2025-09-08 12:14:42 +00:00
..
bin
cmake chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
include/lean feat: add array access functions that return a borrowed result (#9864) 2025-08-12 04:25:14 +00:00
Init fix: bug at Poly.combine_mul_k (#10296) 2025-09-08 02:17:11 +00:00
initialize feat: remove the old compiler (#9275) 2025-07-09 06:00:46 +00:00
kernel feat: kernel hint for proof-by-reflection (#9865) 2025-08-12 19:24:47 +00:00
lake chore: reorganize Init imports around strings (#10289) 2025-09-07 17:09:14 +00:00
Lean feat: pretty print sorry in "declaration uses 'sorry'" (#10034) 2025-09-08 12:14:42 +00:00
library chore: remove unused FnBody.mdata constructor (#9564) 2025-07-26 15:20:13 +00:00
runtime chore: demote a panic to an exception in saveModuleData (#9127) 2025-09-02 12:25:45 +00:00
shell fix: lake: import-related bugs (#8026) 2025-04-19 21:02:38 +00:00
Std chore: remove instWPMonad instance and test that relies upon it (#10293) 2025-09-07 23:42:52 +00:00
util refactor: port more of shell.cpp to Lean (#10086) 2025-08-26 20:02:42 +00:00
cadical.mk fix: cadical distribution on Linux (#8201) 2025-05-02 18:25:16 +00:00
CMakeLists.txt chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
config.h.in perf: use mimalloc by default (#7710) 2025-03-30 22:40:41 +00:00
githash.h.in
Init.lean chore: module-ize Init.lean 2025-06-29 16:52:13 +02:00
lakefile.toml.in feat: maxErrors option (#10262) 2025-09-06 14:52:49 +00:00
lean-toolchain
Lean.lean refactor: module-ize Lean (#9330) 2025-07-25 12:02:51 +00:00
lean.mk.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
Leanc.lean fix: Unicode path support for Lean Windows executables (#10133) 2025-08-27 11:28:55 +00:00
out feat: ac normalization in grind (#10146) 2025-08-27 03:28:30 +00:00
Std.lean chore: add module keyword to grind tests (#10036) 2025-08-21 22:02:08 +00:00
stdlib.make.in chore: further split libleanshared on Windows to avoid symbol limit (#10136) 2025-08-26 16:01:57 +00:00
stdlib_flags.h chore: remove old documentation site (#7974) 2025-05-14 14:31:33 +00:00
version.h.in feat: language reference links and examples in docstrings (#7240) 2025-03-12 09:17:27 +00:00