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

Fix unstable existential type names bug. #839

Closed

Conversation

gkossakowski
Copy link
Contributor

Fix the problem with unstable names synthesized for existential
types (declared with underscore syntax) by renaming type variables
to a scheme that is guaranteed to be stable no matter where given
the existential type appears.

We can do that because type variables declared in existential types
are scoped to those types so the renaming operation is rather local.

There's a specs2 unit test covering instability of existential types.
The test is included in compiler-interface project and the build
definition has been modified to enable building and executing tests
in compiler-interface project. Some dependencies has been modified:

  • compiler-interface project depends on api project for testing
    (test makes us of SameAPI)
  • dependency on junit has been introduced because it's needed
    for @RunWith annotation which declares that specs2 unit
    test should be ran with JUnitRunner

SameAPI has been modified to expose a method that allows us to
compare two definitions.

Also, a integration test has been added which tests scenario
mentioned in #823.

This commit fixes #823.

Fix the problem with unstable names synthesized for existential
types (declared with underscore syntax) by renaming type variables
to a scheme that is guaranteed to be stable no matter where given
the existential type appears.

We can do that because type variables declared in existential types
are scoped to those types so the renaming operation is rather local.

There's a specs2 unit test covering instability of existential types.
The test is included in compiler-interface project and the build
definition has been modified to enable building and executing tests
in compiler-interface project. Some dependencies has been modified:

  * compiler-interface project depends on api project for testing
    (test makes us of SameAPI)
  * dependency on junit has been introduced because it's needed
    for `@RunWith` annotation which declares that specs2 unit
    test should be ran with JUnitRunner

SameAPI has been modified to expose a method that allows us to
compare two definitions.

Also, a integration test has been added which tests scenario
mentioned in sbt#823.

This commit fixes sbt#823.
@gkossakowski
Copy link
Contributor Author

This slipped due to my other responsibilities. I'll open a new PR once I implement the De Bruijn index-like notion of existential type renaming.

@gkossakowski gkossakowski deleted the unstable-existential-names branch October 24, 2013 09:38
adpi2 pushed a commit to adpi2/sbt that referenced this pull request Oct 9, 2024
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