Knot-tying: why and how (and my opinions on it)

from blog osa1.net - All posts, | ↗ original
Suppose I have this simple language: data Expr = IdE Id | IntE Int | Lam Id Expr | App Expr Expr | IfE Expr Expr Expr | Let Id Expr Expr When generating code, for an identifier that stands for a lambda, I want to know the arity of the lambda, so that I can generate more efficient code. While in this language a lambda takes only one...