
4 Nov
2010
4 Nov
'10
6:32 p.m.
On 11/04/2010 03:06 PM, Dan Doel wrote:
Implementing type inference can be very easy in a logic language, because most of the work in a non-logic language is implementing unification:
http://muaddibspace.blogspot.com/2008/01/type-inference-for-simply-typed- lambda.html
3 lines of Prolog to infer types for the simply typed lambda calculus with meta-variables (not counting the operator fixity declarations). I've written something similar in Haskell, and it's more like 80 lines of real code, a lot of which is implementing things that are simply part of Prolog's computation model.
-- Dan
Cool! Thank you very much; that is exactly the kind of thing I was looking for. :-) Cheers, Greg