GraphiteEditor / GraphiteEditor/Graphite

Bidirectional type inference

Open
#1,621 0 comments 0 reactions 1 assignee Claimed by @TrueDoctor View on GitHub
Graphene
Dominant language
Rust
Stars
27.2k
Forks
1.3k
Avg merge
20h 5m
Merged PRs (30d)
57

Description

Implement https://en.wikipedia.org/wiki/Hindley–Milner_type_system in Graphene. Or that might be unnecessarily complex and powerful for our needs, where we just likely need bidirectional type inference, something akin to Rust's own ability to detect what a variable's declared type is based on usages. 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 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

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.