Get the latest tech news

Damas-Hindley-Milner inference two ways


What is Damas-Hindley-Milner?

Damas-Hindley-Milner (HM) is a type system for the lambda calculus (later adapted for Standard ML and the ML-family languages) with parametric polymorphism, aka generic functions. In order to make inference for polymorphism decidable (I think), you have to pick some limited set of points in the concrete syntax to generalize types. We won’t have an implementation here, but you should go take a look at the paper which does a nice side-by-side of W and M. Reader, if you would like to contribute a small version of Algorithm M using our data structures, I would be happy to include it.

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Ways

Ways

Photo of Milner inference

Milner inference

Photo of Damas-Hindley-Milner

Damas-Hindley-Milner

Related news:

News photo

'Shoe doping' changed marathon times in ways we still don't understand

News photo

[The Atlantic] I’m Running Out of Ways to Explain How Bad This Is: What’s happening in America today is something darker than a misinformation crisis.

News photo

Jupiter's Great Red Spot Is Shapeshifting in Ways 'Never Identified Before'