Skip to content

Tailor unknown-identifier hints for special forms#19

Merged
myzie merged 1 commit into
mainfrom
suggester-polish
May 8, 2026
Merged

Tailor unknown-identifier hints for special forms#19
myzie merged 1 commit into
mainfrom
suggester-polish

Conversation

@myzie
Copy link
Copy Markdown
Contributor

@myzie myzie commented May 8, 2026

What

  • Skip exact-match suggestions in closestName so a typed name no longer suggests itself.
  • When the unresolved identifier is a higher-order form, return "<name>" is a special form, did you mean to call <signature>?, with try's signature distinguished from the (xs, predicate) shape shared by the other forms.
  • Update suggest_test, docs/reference/spec.md, and llms.txt to cover the new hint.

Why

did you mean "count"? is noise when the user already typed count. The form name is in the candidate set so the levenshtein loop loops back to itself; the new hint instead points at the call shape, including try's distinct (value, default) signature.

Test plan

  • go test ./...
  • go test -race ./...
  • go test -run=^$ -fuzz=FuzzCompile -fuzztime=20s .
  • go test -run=^$ -fuzz=FuzzEval -fuzztime=20s .

What:
- Skip exact-match suggestions in closestName so a typed name no
  longer suggests itself.
- When the unresolved identifier is a higher-order form, return
  `"<name>" is a special form, did you mean to call <signature>?`,
  with try's signature distinguished from the (xs, predicate) shape
  shared by the other forms.
- Update suggest_test, spec, and llms.txt to cover the new hint.

Why:
- "did you mean count?" is noise when the user already typed count.
  The form name is in the candidate set so users get a useful pointer
  to the right shape, including try's distinct (value, default)
  signature.
@myzie myzie merged commit 52c4e8d into main May 8, 2026
1 check passed
@myzie myzie deleted the suggester-polish branch May 8, 2026 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant