eloign / YAL

Yet Another Language is a pure functional language written in Haskell
MIT License
0 stars 0 forks source link

The Let-Polymorphism #2

Closed eloign closed 2 years ago

eloign commented 2 years ago

In our realization, we actually don't have let-polymorphism by this time, but we need it! Or maybe we think that we have it, but actually not. Consider the next code, which (how surprisingly) fails: Let "id" (Lam "x" (Var "x")) (App (Var "id") (Var "id")) If we run it, we will have the perfect infinite loop, which can be used to go outside, make some friends, find a girlfriend... Well, what I'm about... Regrately (or not in Scottish-style: regretfully), we need to fix it, I need to fix it... So, we'll wait for you, mister Le'Pomorph!

eloign commented 2 years ago

Now fixed!