Associated constant assignment versus equality (#2173)

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 <josh11b@users.noreply.github.com>
This commit is contained in:
Richard Smith
2023-02-01 10:03:30 -08:00
committed by GitHub
co-authored by josh11b
parent 61c34c7a10
commit 0b6411e6cc
+1360
View File
File diff suppressed because it is too large Load Diff