Skip to content

Improved names for out-of-scope variables + fix shadowing - #3446

Merged
jespercockx merged 12 commits into
agda:masterfrom
jespercockx:shadowing
Dec 10, 2018
Merged

jespercockx merged 12 commits into
agda:masterfrom
jespercockx:shadowing

Conversation

@jespercockx

Copy link
Copy Markdown
Member

This PR removes the notation for out-of-scope variables (previously '.' and more recently ';', see #3127 ) and replaces it with a proper mechanism for making up names for things that are not in scope. In the process, I also implemented a solution for the problem of shadowed variables (#572).

It would be good if someone could go over the changed error messages for the test suite to make sure they make sense.

Remaining questions to be looked at (mostly as a note to myself):

  • Currently generated names try to avoid all top-level definitions including generalized names, perhaps we could have an exception for generalized names as it's not really a problem to shadow them.
  • The test case for Better error message for identically rendered unequal terms #1826 is a bit broken but I don't think this PR really makes the situation much worse.
  • Substitutions for meta variables sometimes have duplicate names for the context arguments, perhaps we should apply the shadowing rules here as well.
  • I should probably add something to the changelog as well.

@jespercockx

Copy link
Copy Markdown
Member Author

I'm merging this now to hopefully give it at least some testing before the release.

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.

1 participant