Bidirectional type checking step by step (in Ruby)
luizpvas.github.io·4h·
Discuss: Hacker News

This article is intended for people with little experience in type theory and programming language theory struggling with papers telling them their algorithm is extraordinarily simple before showing this:

image

After reading Complete and Easy Bidirectional Typechecking for Higher-Rank Polymorphism, I agree that it is actually simple, especially compared to algorithms that require constraint solving and unification. It is simple, but definitely not easy. We have some work ahead of us.

The code is available on this gist if you want to skip ahead and see the full implementation.

Type checking

Type checking is the process that vali…

Similar Posts

Loading similar posts...