This is cool!  It&#x27;s nice to have a bite-sized runnable illustration of HM.  Maybe I will finally be able to understand it — both the code and the linked lecture notes (<a href="http:&#x2F;&#x2F;www.cs.cornell.edu&#x2F;courses&#x2F;cs3110&#x2F;2011sp&#x2F;lectures&#x2F;lec26-type-inference&#x2F;type-inference.htm" rel="nofollow">http:&#x2F;&#x2F;www.cs.cornell.edu&#x2F;courses&#x2F;cs3110&#x2F;2011sp&#x2F;lectures&#x2F;lec...</a>) look pretty informative.  I don&#x27;t think I can digest it in time to comment before it scrolls off the HN front page.<p>It&#x27;s a little unfortunate that this version doesn&#x27;t include let-polymorphism, since that&#x27;s necessary for parametrically polymorphic functions to be actually polymorphic, and it&#x27;s not a recent addition — it&#x27;s in the original Damas-Milner paper.  All the other stuff about tuples, lists, sum types, and whatnot can be emulated with functions, but not let-polymorphism, not without a potentially exponential blowup in the program size.