justinlubin / cobbler

Refactor programs to use library functions!
5 stars 0 forks source link

Add let-polymorphism #37

Closed justinlubin closed 1 year ago

justinlubin commented 1 year ago

This pull request builds on the type variables introduced in #32 generalizing free variables of definitions into type schemes, allowing for let-polymorphism. Very conveniently, this means that the syntax of lambda abstractions does NOT contain its type, simplifying many program transformations.

This pull request also updates term enumeration to work for polymorphic components by unifying the freshened codomain of a potential component with the target hole type (rather than syntactically checking for equality).