Skip to content

Commit

Permalink
Associated constant assignment versus equality (#2173)
Browse files Browse the repository at this point in the history
Split the `where A == B` constraint in two: `where .A = B` produces a new
constraint from an old one, where the value of `.A` in the new constraint is
known and eagerly rewritten to `B`, and `where A == B`, which does not cause
`A` and `B` to be considered as identical by language rules but does permit
implicit (no-op) conversion between them.
 
This aims to provide an efficiently-computable and human-understandable type
equality rule, with type canonicalization and therefore transitive type
equality, without sacrificing too much in the way of ergonomics and without
sacrificing determinism, while still providing the full power of a general type
constraint system in a less ergonomic form.

Co-authored-by: josh11b <[email protected]>
  • Loading branch information
zygoloid and josh11b authored Feb 1, 2023
1 parent 61c34c7 commit 0b6411e
Showing 1 changed file with 1,360 additions and 0 deletions.
Loading

0 comments on commit 0b6411e

Please sign in to comment.