lean4-htt/src
Robert J. Simmons dd28f00588
feat: hint alternatives when field-projecting from an unknown type (#11482)
This PR gives suggestions based on the currently-available constants
when projecting from an unknown type.

## Example: single suggestion in namespace

This was the originally motivating example, as the string refactor led
to a number of anonymous-lambda-expressions with `Char` functions that
were no longer recognized as such.

```lean4
example := (·.isWhitespace)
```
Before:
```
Invalid field notation: Type of
  x✝
is not known; cannot resolve field `isWhitespace`
```
The message is unchanged, but this PR adds a hint:
```
Hint: Consider replacing the field projection `.isWhitespace` with a call to the function `Char.isWhitespace`.
```

## Example: single suggestion in namespace

```lean4
example := fun n => n.succ
```
Before:
```
Invalid field notation: Type of
  n
is not known; cannot resolve field `succ`
```
The message is unchanged, but this PR adds a hint:
```
Hint: Consider replacing the field projection with a call to one of the following:
  • `Fin.succ`
  • `Nat.succ`
  • `Std.PRange.succ`
```
2025-12-03 20:48:34 +00:00
..
bin
cmake chore: fix spelling errors (#10042) 2025-08-22 07:23:12 +00:00
include/lean perf: less allocations when using string patterns (#11255) 2025-11-19 13:06:27 +00:00
Init feat: add Grind.Config.reducible (#11480) 2025-12-02 18:10:55 +00:00
initialize feat: zero cost BaseIO (#10625) 2025-10-22 10:55:12 +02:00
kernel chore: CI: enable leak sanitizer again (#11339) 2025-11-27 18:32:35 +00:00
lake feat: lake: resolve module clashes on import (#11270) 2025-12-03 00:46:20 +00:00
Lean feat: hint alternatives when field-projecting from an unknown type (#11482) 2025-12-03 20:48:34 +00:00
library refactor: port shell option processing to Lean (v2) (#11434) 2025-12-02 17:41:51 +00:00
runtime refactor: port shell option processing to Lean (v2) (#11434) 2025-12-02 17:41:51 +00:00
shell chore: tests: use filenames as test names (#11302) 2025-11-21 12:40:58 +00:00
Std feat: add mem_of_get_eq and of_getElem_eq (#11452) 2025-12-02 15:00:00 +00:00
util refactor: port shell option processing to Lean (v2) (#11434) 2025-12-02 17:41:51 +00:00
cadical.mk
CMakeLists.txt fix: cadical dynamic dependencies (#11475) 2025-12-02 13:54:26 +00:00
config.h.in
githash.h.in
Init.lean chore: more reorganization of strings (#10928) 2025-10-23 11:56:11 +00:00
lakefile.toml.in feat: USE_LAKE_CACHE CMake option (#10708) 2025-10-08 08:56:53 +00:00
lean-toolchain
Lean.lean chore: use 'library suggestions' rather than 'premise selection' (#11029) 2025-10-31 04:07:49 +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: more module system fixes and refinements for finishing batteries port (#10819) 2025-10-21 08:19:50 +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 feat: reduce server memory consumption (#11162) 2025-12-01 10:53:23 +00:00
version.h.in