Skip to content

Conversation

leana8959
Copy link
Contributor

Related to (the second part of) #145

I got the "add unknown symbol to inherit clause" feature working, what do you think?

Copy link
Owner

@oxalica oxalica left a comment

Choose a reason for hiding this comment

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

I don't really like the behavior to provide one action for each existing inherit. Too many wrong suggestions are worse than too few legit suggestions.

I think the expected behavior here is to use evaluation to figure out which variable can we really inherit from, without blindly suggest everything. But of course this requires more infrastructures that are not supported yet.

A possible solution for now (with local inference) is probably to have an action to replace attrpath by inherit: lib.foo => let inherit (lib) foo; in foo. It adds to existing inherit if exists, or create a new one in the top-most possible let-in. This would be good for refactoring, but may not help a lot during typing.

@leana8959
Copy link
Contributor Author

leana8959 commented Jul 24, 2025

Too many wrong suggestions are worse than too few legit suggestions.

hm, I never thought about that, but I'd say I agree.

I think the expected behavior here is to use evaluation to figure out which variable can we really inherit from.

I see.

I'll think about the alternative you suggested or wait for the infra to suggest based on evaluation results. Thank you for your time!

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.

2 participants