fir-lang / fir

MIT License
23 stars 3 forks source link

Implement a simple type checker #17

Closed osa1 closed 1 month ago

osa1 commented 2 months ago

This implements type checking in the interpreter.

The type system is simple:

We also don't implement row polymorphism for anonymous types in the interpreter.

The result is a very simple type checker that checks each function in isolation.

osa1 commented 1 month ago

Almost there.. we need to implement default trait methods so that __gt etc. will work when you only implement cmp.

osa1 commented 1 month ago

I think we just need to check that the predicates hold after checking functions and that should be it! (for now)