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

Rework variances of higher-kinded types #8082

Merged
merged 32 commits into from
Jan 31, 2020

Commits on Jan 29, 2020

  1. Implement base variance ops

     + refactoring: account for Bivariance
     + refactpring: collect variance related ops in Variances,
       move Variances to core.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    0d692ea View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    573c454 View commit details
    Browse the repository at this point in the history
  3. Add infrastructure for setting paramVariances in HKTypeLambdas

    This is meant as a better alternative to encode variances in parameter names.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    8bfdc0b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    8a7abc7 View commit details
    Browse the repository at this point in the history
  5. Don't encode variances in names

    Encode them instead in the upper bound lambda of a TypeBounds type.
    
    For now, we also encode them in the alias of a Typealias type, but
    this will be dropped one we pass to structural lambda variance.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    dcff28c View commit details
    Browse the repository at this point in the history
  6. Parse and print variances according to new scheme

    The old encoding using semantic parameter name is still in place. The
    new recording inside TypeBounds exists alongside the old one.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    d557ae1 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    0eb65e5 View commit details
    Browse the repository at this point in the history
  8. Update repltest

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ba42a23 View commit details
    Browse the repository at this point in the history
  9. Update signature help test

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    0847719 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    9fb77fd View commit details
    Browse the repository at this point in the history
  11. Make useVariances tunable

    Needs to be passed as a parameter since Namer does not construct
    a bounds immediately.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    50ae719 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    3bd90cd View commit details
    Browse the repository at this point in the history
  13. Blacklist 3 pickling tests

    These can hopefully be revived once the variance changes have completed
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    91e167b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    39657ec View commit details
    Browse the repository at this point in the history
  15. Drop VariantNames

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    d983f4f View commit details
    Browse the repository at this point in the history
  16. Treat type lambdas structurally ...

    ... unless they are on the right hand side of type bounds or
    match aliases or they are type aliases where some variance is
    given explicitly with a `+` or `-`.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ef7bb36 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    f358710 View commit details
    Browse the repository at this point in the history
  18. Revert "Blacklist 3 pickling tests"

    This reverts commit 7d6e75e.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    7c7bc58 View commit details
    Browse the repository at this point in the history
  19. Add fixed issue tests

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    ec293d9 View commit details
    Browse the repository at this point in the history
  20. Update check files

    Type lambdas don't print with variances anymore
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    eef36c0 View commit details
    Browse the repository at this point in the history
  21. Drop adaptHkVariance

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    4ecf246 View commit details
    Browse the repository at this point in the history
  22. Simplify EtaExpand

    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    5c9d041 View commit details
    Browse the repository at this point in the history
  23. Disallow variances in type lambdas

    Since variances are associated conceptually with higher-kinded type variables,
    it makes no sense to write them on type lambdas. I believe it's better to disallow
    writing variances there because it will only need to variance-bike-shedding otherwise.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    d2a2fdd View commit details
    Browse the repository at this point in the history
  24. Configuration menu
    Copy the full SHA
    86cb086 View commit details
    Browse the repository at this point in the history
  25. Improve isRef queries against top types

    A refinement type would previously qualify as an `isRef` of
    Any, AnyKind, or AnyRef. Often that is not what was intended.
    Break out `isAny`, `isAnyKind`, and `isAnyRef` methods for
    tests that don't go through refinements.
    odersky committed Jan 29, 2020
    Configuration menu
    Copy the full SHA
    da5ab63 View commit details
    Browse the repository at this point in the history
  26. Configuration menu
    Copy the full SHA
    363a05c View commit details
    Browse the repository at this point in the history
  27. Configuration menu
    Copy the full SHA
    bfa8579 View commit details
    Browse the repository at this point in the history
  28. Configuration menu
    Copy the full SHA
    eb04b8f View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2020

  1. Address review comments

    odersky committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    8667689 View commit details
    Browse the repository at this point in the history
  2. Add comment link to test

    odersky committed Jan 30, 2020
    Configuration menu
    Copy the full SHA
    80c91ee View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2020

  1. Fix typos

    odersky committed Jan 31, 2020
    Configuration menu
    Copy the full SHA
    22a7a81 View commit details
    Browse the repository at this point in the history
  2. Remove stray comment line

    odersky committed Jan 31, 2020
    Configuration menu
    Copy the full SHA
    2396fe9 View commit details
    Browse the repository at this point in the history