lambda - Which is the difference between these polymorphic types? -
in system f, difference between following 3 types: 
reproduced in text here:
∀x.((x → x) → (x → x)) ∀x.((x → x) → ∀x.(x → x)) ((∀x.x → x) → (∀x.x → x)) is second 1 more general first?
depends on how tight forall quantifier binds. lets assume binds on next terminal expression (variable or ()-block).
the first become (x0 -> x0) -> (x0 -> x0) x0 fresh type variable.
the second become (x0 -> x0) -> forall x1. (x1 -> x1) x0 , x1 fresh.
the third - (bot -> x) -> (bot -> x) x old binding , bot uninhabited forall x. x.
Comments
Post a Comment