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

Automatic annotation of top-level type signatures #7042

Open
smores56 opened this issue Aug 30, 2024 · 5 comments · May be fixed by #7130
Open

Automatic annotation of top-level type signatures #7042

smores56 opened this issue Aug 30, 2024 · 5 comments · May be fixed by #7130
Assignees
Labels
formatting Relates to the roc formatter good first issue Good for newcomers

Comments

@smores56
Copy link
Collaborator

We want to let users have Roc give their functions an inferred type signature. There are a few ways we want to provide this:

Our LSP should provide two new code actions:

  1. "Add signature" to this value, either at top level or within a function/block
  2. At the top of the file, "Add signatures to all top-level defs" with missing signatures

We also want our formatter to have a new subcommand annotate that will add signatures to all top-level defs in a file with missing signatures. e.g. roc format annotate <file.roc>

@smores56 smores56 added good first issue Good for newcomers formatting Relates to the roc formatter labels Aug 30, 2024
@snobee snobee linked a pull request Sep 29, 2024 that will close this issue
@gamebox
Copy link
Collaborator

gamebox commented Dec 1, 2024

As I've done some work on the formatter in the snake_case support issue, I'd like to take this on.

@Anton-4
Copy link
Collaborator

Anton-4 commented Dec 2, 2024

Awesome @gamebox ❤️

@gamebox
Copy link
Collaborator

gamebox commented Dec 3, 2024

I see that @snobee has a fork where he’s working on this. Did you want to finish this?

@snobee
Copy link
Contributor

snobee commented Dec 4, 2024

I got distracted by some issues with ranges when desugaring suffixed expressions that cause issues with the language server part of this. I realise it's not necessary to merge the pr though. There's not much left to do so I would still like to finish it up if that's ok @gamebox

@gamebox gamebox removed their assignment Dec 5, 2024
@gamebox
Copy link
Collaborator

gamebox commented Dec 5, 2024

Could you assign this to @snobee @Anton-4 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
formatting Relates to the roc formatter good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants