Replace Type::TypeVariable
, Type::PolymorphicInteger
, and all other type variables with one kind
#1991
Labels
Type::TypeVariable
, Type::PolymorphicInteger
, and all other type variables with one kind
#1991
Problem
As the typechecker grows it can be useful to have different kinds of type variables. E.g. variables that can bind to anything, or only integer types, or integer and field types, etc. However, for these cases we currently have to create an entirely new variant of
Type
each time and implement most cases the same way.Happy Case
We should only have
Type::TypeVariable
, and it should contain an internal enumerationTypeVariableKind
detailing what kind of type variable it is. This will allow us to add and work with type variables more easily without bloating ourType
representation. Example of this enum:Alternatives Considered
No response
Additional Context
No response
Would you like to submit a PR for this Issue?
No
Support Needs
No response
The text was updated successfully, but these errors were encountered: