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

Make the Graphene type system more powerful with HM type inference #1621

Open
Tracked by #144
Keavon opened this issue Feb 21, 2024 · 0 comments
Open
Tracked by #144

Make the Graphene type system more powerful with HM type inference #1621

Keavon opened this issue Feb 21, 2024 · 0 comments
Labels
Graphene Involves the node graph system/engine used by Graphite Rust Involves Rust programming for the backend

Comments

@Keavon
Copy link
Member

Keavon commented Feb 21, 2024

Implement https://en.wikipedia.org/wiki/Hindley–Milner_type_system in Graphene. Essentially this means we'd have up-and-down type inference, like what's common in languages such as TS or Rust. This can help us use the appropriate node implementation based on its surroundings, which is particularly important for dealing with the involvement or non-involvement of Footprint in a type (especially with the Transform node). It'll also let us know which typed implementation of a node is the appropriate one to reference when a node input is disconnected (but it's not part of the rendered graph) and that input has to be set to some type's default value.


  • Type inference at declaration site when usage site is further up or down in the node flow (needed to allow the Number value node to have a built-in Into node)
    • Support for traits
@Keavon Keavon added Rust Involves Rust programming for the backend Graphene Involves the node graph system/engine used by Graphite labels Feb 21, 2024
@Keavon Keavon changed the title Make the Graphene type system more powerful Make the Graphene type system more powerful with HM type inference May 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Graphene Involves the node graph system/engine used by Graphite Rust Involves Rust programming for the backend
Projects
Status: Short-Term
Development

No branches or pull requests

1 participant