Skip to content

diagnostics: the def hint suggests let greet _ = … for a parameterless function - #176

Merged
simontreanor merged 1 commit into
mainfrom
def-hint-unit-param
Oct 17, 2026
Merged

simontreanor merged 1 commit into
mainfrom
def-hint-unit-param

Conversation

@simontreanor

Copy link
Copy Markdown
Owner

Follow-up to #175. def greet(): was answered with let greet () = …, which does not parse: Pyfun has no () parameter pattern, and a function that takes nothing is written let greet _ = … and called as greet (). The hint now suggests that, and the test also checks that every suggested spelling parses, so a wrong suggestion fails the test instead of reaching a user.

…ess function

`def greet():` was answered with `let greet () = …`, which does not parse:
Pyfun has no `()` parameter pattern, and a function that takes nothing is
written `let greet _ = …` and called as `greet ()`. The test now also checks
that every suggested spelling parses.
@simontreanor
simontreanor merged commit 67920dc into main Oct 17, 2026
21 checks passed
@simontreanor
simontreanor deleted the def-hint-unit-param branch October 17, 2026 21:54
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