This tutorial seems to miss the level-based generalization optimization, which is crucial for production-strength HM inference. For, that you can look at:
Level based generalization is a massive improvement in speed - I'm currently writing a Standard ML compiler for fun, and I saw a 30-50% decrease in elaboration type-checking duration when I switched to using levels. And it's not difficult at all to implement.
shpongled|5 years ago