Hindley-Milner Type Inference implement in (although not for) Python.
This is the code taken from my popular blog post http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/ and has recently been tidied up an bit.