3 ms·
This is really cool. It's surprisingly hard to find good examples of how to implement type inference.
by edgarbob 11y ago
This is really cool. It's surprisingly hard to find good examples of how to implement type inference.
- shadowfox 11y agoIf I remember right, TAPL (Types and Programming Languages by Benjamin Pierce) contains implementations for nearly everything that it talks about. So you can find another implementation of Hindley-Milner there. I don't think it includes row typing though.
- deleted 11y ago[deleted]
- danblick 11y agoYes, there are implementations for many of the type systems in the book. :) https://www.cis.upenn.edu/~bcpierce/tapl/checkers/ 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.
- jarcane 11y agoI think PLAI gets into it, but I've not read it. http://cs.brown.edu/courses/cs173/2012/book/ http://cs.brown.edu/courses/cs173/2012/book/