Get the latest tech news

Adding row polymorphism to Damas-Hindley-Milner


Intro to HM

In order to unify and print rows, we’ll often deal with them in their flattened representation, which is a collapsed tuple of fields and a rest type. Pattern matching inference changed a little bit since the last post but not enough to make a big deal out of it. I thought that there was some quirk or trick in the representation that enabled row polymorphism, but that’s not the case at all(shout-out to Sinan and River for making this clear).

Get the Android app

Or read this on Hacker News

Read more on:

Photo of Damas-Hindley-Milner

Damas-Hindley-Milner

Photo of row polymorphism

row polymorphism

Related news:

News photo

Damas-Hindley-Milner inference two ways