Advanced
Compilers & Programming Language Theory
Q81 / 100
What is the Hindley-Milner let-polymorphism and its restriction?
Correct! Well done.
Incorrect.
The correct answer is A) Polymorphism allowing let-bindings to be polymorphic while lambdas are monomorphic
A
Correct Answer
Polymorphism allowing let-bindings to be polymorphic while lambdas are monomorphic
Explanation
HM let-polymorphism: let f = λx.x in (f 1, f "a") type-checks (f is polymorphic). But (λf. (f 1, f "a")) (λx.x) doesn't (lambda parameters can't be polymorphic in HM — rank-2 types needed).
Progress
81/100