Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tc-env-lookup-value: suggest type constructors #1097

Merged
merged 1 commit into from
Jun 3, 2024

Conversation

jbouwman
Copy link
Collaborator

On variable lookup miss, existing suggestion code has no effect because it looks at the two places just checked. Instead check the environment to see if the var names a type, meaning, maybe the user was looking for a type constructor.

Closes #1095

Copy link
Member

@stylewarning stylewarning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

love this kind of usability enhancement. just some bitty things

src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
Copy link
Member

@stylewarning stylewarning left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, would like @eliaslfox to peek too

src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
src/typechecker/tc-env.lisp Outdated Show resolved Hide resolved
On variable lookup miss, existing suggestion code has no effect
because it looks at the two places just checked. Instead check the
environment to see if the var names a type, meaning, maybe the user
was looking for a type constructor.
@eliaslfox eliaslfox enabled auto-merge (rebase) June 3, 2024 17:01
@eliaslfox eliaslfox merged commit ef5b4b8 into coalton-lang:main Jun 3, 2024
17 checks passed
@jbouwman jbouwman deleted the suggest-constructor branch September 27, 2024 22:39
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.

Using Type name instead of constructor returns opaque unknown variable error
3 participants