Also note that the TAPL type checkers include no type inference, while in 2024 at least some amount of type inference is so common its lack is worth pointing out. So if you come here expecting HM or unification or such you’ll be disappointed.
Adding type inference to these languages is another step up in difficulty. Because System F and Fw don’t have principle types, there is no canonical inference method. There’s a lot of room for personal taste here, so it’s probably not good textbook material.
Having linked the code, is there anything you want reviewed?
Not really, just thought it might be handy or interesting for people.
Afaict principal types are mostly useful for whole-program inference without annotations. My personal taste is usually for type annotations on functions, so it doesn’t worry me too much. As long as there’s always a single correct answer for types, fairly non-fancy unification seems to do a decent job of finding it so far.
Adding type inference to these languages is another step up in difficulty. Because System F and Fw don’t have principle types, there is no canonical inference method. There’s a lot of room for personal taste here, so it’s probably not good textbook material.
Having linked the code, is there anything you want reviewed?
Not really, just thought it might be handy or interesting for people.
Afaict principal types are mostly useful for whole-program inference without annotations. My personal taste is usually for type annotations on functions, so it doesn’t worry me too much. As long as there’s always a single correct answer for types, fairly non-fancy unification seems to do a decent job of finding it so far.