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

Include type declaration SourceAnn for values #4471

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

purefunctor
Copy link
Member

Description of the change

This allows the compiler to be more honest about the source annotation for value declarations. During desugaring, the SourceAnn for a value declaration is replaced with a corresponding type declaration's SourceAnn if it exists.

I noticed this while working on #4247 and it messes up the order for constructing the interval tree
which I intend to serialize into a file/use in psc-ide as part of the type-on-hover stuff.

Another solution for this is to expand the annotation during desugaring such that both the annotation and value declaration is covered, but this changes behaviour in error messages.


Checklist:

  • Added a file to CHANGELOG.d for this PR (see CHANGELOG.d/README.md)
  • Added myself to CONTRIBUTORS.md (if this is my first contribution)
  • Linked any existing issues or proposals that this pull request should close
  • Updated or added relevant documentation
  • Added a test for the contribution (if applicable)

@purefunctor purefunctor marked this pull request as draft April 30, 2023 14:12
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.

None yet

1 participant