Skip to content

Implement polymorphic labels in the type system #4635

Description

@Marwes

As described in #4410, there are many builtins that could get more precise type signatures with a way to abstract over record labels in the type system. #4388 sketches out such an type system extension, dubbed "Polymorphic labels".

Since updating the type signatures of the builtins may cause breakages we want to first implement and test the feature for new functions after which we can decide on a strategy for applying this to existing functions.

DOD:

  • Decide and implement on a syntax for distinguishing a record field being a variable or a concrete field (Is A a variable or concrete "A" in { A: int })
  • Provide alternate builtins in experimental for some of the functions that can use polymorphic labels for testing (both for running scripts and the LSP)
  • A feature flag exists to turn on labels in the typechecker

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions