JSAbrahams / mamba

🐍 The Mamba programming language, because we care about safety
MIT License
88 stars 4 forks source link

Use contraint type checking instead of simple recursion #166

Closed JSAbrahams closed 4 years ago

JSAbrahams commented 4 years ago

Relevant issues

Summary of current issue

Currently, we use simple recursion to type check our application. However, this is rather limited, as the type inference stage can inference very little.

Proposed change

Use constraints during type checking to allow for more advanced type checking. Ideally, this should also make it much easier to implement for instance generics. However, it will require us to closely keep track of the namespace of variables.