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

Add record constructor to subtyping #2007

Merged
merged 24 commits into from
Sep 6, 2024

Commits on Aug 6, 2024

  1. Configuration menu
    Copy the full SHA
    da2e4af View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5897969 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    186ca8d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f795609 View commit details
    Browse the repository at this point in the history
  5. Copy comments (general comment on subsumption and closing a record wh…

    …en there is a record/dictionary subsumption)
    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    4c74bb6 View commit details
    Browse the repository at this point in the history
  6. Fix problem (it was error reporting...)

    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    f832319 View commit details
    Browse the repository at this point in the history
  7. Rename trait

    Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
    Eckaos and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    3e6b4b6 View commit details
    Browse the repository at this point in the history
  8. Correct spelling in comments

    Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
    Eckaos and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    ca781bb View commit details
    Browse the repository at this point in the history
  9. Rename trait impl

    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    6e95840 View commit details
    Browse the repository at this point in the history
  10. Rename trait

    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    c9e4f5a View commit details
    Browse the repository at this point in the history
  11. Update comments

    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    0dbc986 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    49f6bdf View commit details
    Browse the repository at this point in the history
  13. Add test

    Eckaos authored and yannham committed Aug 6, 2024
    Configuration menu
    Copy the full SHA
    b09a6d6 View commit details
    Browse the repository at this point in the history

Commits on Aug 7, 2024

  1. Add documentation

    Eckaos committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    de31fce View commit details
    Browse the repository at this point in the history
  2. Rename trait (for clippy)

    Eckaos committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    264e067 View commit details
    Browse the repository at this point in the history
  3. Add tests

    Eckaos committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    4afcad2 View commit details
    Browse the repository at this point in the history
  4. Modify snapshot lsp

    Eckaos committed Aug 7, 2024
    Configuration menu
    Copy the full SHA
    34ad290 View commit details
    Browse the repository at this point in the history

Commits on Aug 9, 2024

  1. Update comments core/src/typecheck/subtyping.rs

    Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
    Eckaos and yannham authored Aug 9, 2024
    Configuration menu
    Copy the full SHA
    e739173 View commit details
    Browse the repository at this point in the history
  2. Update doc/manual/typing.md

    Co-authored-by: Yann Hamdaoui <yann.hamdaoui@gmail.com>
    Eckaos and yannham authored Aug 9, 2024
    Configuration menu
    Copy the full SHA
    90f33ea View commit details
    Browse the repository at this point in the history
  3. Modify comment

    Eckaos committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    fa5e76a View commit details
    Browse the repository at this point in the history
  4. Modify comment

    Eckaos committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    5405ee2 View commit details
    Browse the repository at this point in the history
  5. Revert lsp snapshot

    Eckaos committed Aug 9, 2024
    Configuration menu
    Copy the full SHA
    edae4f2 View commit details
    Browse the repository at this point in the history

Commits on Sep 6, 2024

  1. Cosmetic improvements

    This commit performs minor cosmetic improvements in the code handling
    subtyping, mostly around comments and function interfaces.
    yannham committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    f9fba13 View commit details
    Browse the repository at this point in the history
  2. Update snapshot test for LSP

    The support of subtyping for record types makes some types to be
    instantiated earlier than before. Given the way terms are visited, when
    writing something like `let f = std.array.map in ..`, `std.array.map`
    used to be inferred to be of a polymorphic type `forall a b. ...` and
    then only was instantiated (because record access is inferred, while the
    bound expression is checked). With the new implementation, it is
    instantiated as part of the subsumption rule, meaning that it'll appear
    differently on the LSP.
    
    All in all, both version of the data shown by the LSP (before this
    change and after) are meaningful, in some sense. The polymorphic type is
    still shown when it's part of the metadata anyway, in addition to the
    inferred monomorphic type. This also doesn't change which expressions
    are accepted or not. It's more of an artifact of when we visit terms,
    before or after instantiation and how those visits are intertwined with
    `check` and `infer`. It's not easy to revert to the previous state of
    affairs, and it's in fact not necessarily a good thing either: in the
    example above, the LSP would also show a polymorphic type for `f` - the
    one of `map` - while in fact `f` has a monomorphic type, so you couldn't
    use it in different contexts (say on an `Array Number` and later on a
    `Array String`). The current version is showing the real monomorphic
    nature of `f`.
    yannham committed Sep 6, 2024
    Configuration menu
    Copy the full SHA
    1b699be View commit details
    Browse the repository at this point in the history