11 days ago
- The Futhark type checker originally had a simple design with scalars, arrays, tuples, first-order monomorphic functions, and no type inference, but already included uniqueness types for in-place updates.
- As features like records, modules, higher-order functions, Hindley-Milner inference, and size types were added, the single-pass type checker became increasingly complex and hard to maintain.
- The type checker was eventually split into multiple phases: name resolution, alias checking (post-type-checking), and a core term type checker.
- A new constraint-based unsized type checker was introduced to handle complex features like AUTOMAP, generating constraints solved offline rather than on the fly.