You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need to convert lambdas (aka closures) into top-level function definitions. So this:
f = \x -> (\() -> x) ()
should be converted to
type Fenv a = Fenv { x : a }
f__anon1 = \fenv -> \() -> fenv.x
f = \x -> f__anon (Fenv a) ()
That is, any lambdas that don't appear at the top-level of a top-level function definition should be hoisted into a name-mangled top-level definition and given an extra "environment" parameter that includes all variables captured by closure.
The text was updated successfully, but these errors were encountered:
We need to convert lambdas (aka closures) into top-level function definitions. So this:
should be converted to
That is, any lambdas that don't appear at the top-level of a top-level function definition should be hoisted into a name-mangled top-level definition and given an extra "environment" parameter that includes all variables captured by closure.
The text was updated successfully, but these errors were encountered: