Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on What is Hindley-Milner and why is it cool? (2008). Parent comment
Gamma |- e => t
The other direction also holds:
Gamma |- e <= t
Consider for example, a function:
func foo(a) b
e <= a
In effect, you perform 2 passes: forwards inference, and then backwards inference.
p/s: I'm not actually a PL person. This is from my casual reading, so my understanding is highly probably very wrong
There are no comments on this comment yet.
The other direction also holds:
Now we want to ensure that e conforms to type t.Consider for example, a function:
and an expression that we know the type of already: Therefore we can say when we apply `foo` onto `e`, we'll yield something of type `b`In effect, you perform 2 passes: forwards inference, and then backwards inference.
p/s: I'm not actually a PL person. This is from my casual reading, so my understanding is highly probably very wrong