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

Formatter: Pun aliases when possible #2047

Open
ospencer opened this issue Feb 22, 2024 · 0 comments
Open

Formatter: Pun aliases when possible #2047

ospencer opened this issue Feb 22, 2024 · 0 comments
Labels
grainfmt Issues related to the Grain formatter

Comments

@ospencer
Copy link
Member

There are many cases, such as include statements, where a user might add/refactor into an alias that's the same as the name of the thing they're aliasing, e.g. from "list" include List as List. It'd be good to have the formatter remove the redundant alias.

One thing to consider: a case like let foo = (param as param) => ... is a typechecking error, but formatting the code would make the error go away. We'll need to decide if this is something acceptable for the formatter to fix.

@spotandjake spotandjake added the grainfmt Issues related to the Grain formatter label Jun 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
grainfmt Issues related to the Grain formatter
Projects
None yet
Development

No branches or pull requests

2 participants