This is really cool. It's surprisingly hard to find good examples of how to implement type inference.
I don't think it includes row typing though.
https://www.cis.upenn.edu/~bcpierce/tapl/checkers/
The code is pretty elegant. I think it's intended to be clear enough for students in his classes to modify.