Closed
Description
This section on type variables was written in 2018 (or earlier), and we should check to make sure it is up to date. That would likely involve asking the compiler team on Zulip (in #t-compiler
).
src/type-inference.md
All told, the inference context stores four kinds of inference variables
(as of January 2018):
- Type variables, which come in three varieties:
- General type variables (the most common). These can be unified with any
type.- Integral type variables, which can only be unified with an integral type,
and arise from an integer literal expression like22
.- Float type variables, which can only be unified with a float type, and
arise from a float literal expression like22.0
.- Region variables, which represent lifetimes, and arise all over the place.
cc #1121