teikalang / teika

MIT License
318 stars 7 forks source link

teika: propagate from let #174

Closed EduardoRFS closed 11 months ago

EduardoRFS commented 11 months ago

Goals

Better and more predictable type propagation.

Context

Currently Teika let is typed first the value, then the pattern, but humans tend to assume that typing goes left to right, additionally it is natural to annotate the pattern but not the value, so a pattern -> value typing would be better.

The current flow was done just because it was a more implementation due to another bad design, this PR changes that and add a test for this.