Fix printing FCode with lifted lambdas (#501)

This commit is contained in:
Radosław Rowicki 2024-02-04 09:24:41 +01:00 committed by GitHub
parent 44d6982d66
commit 1387e814f8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1323,7 +1323,12 @@ lambda_lift(FCode = #{ functions := Funs, state_layout := StateLayout }) ->
init_lambda_funs() -> put(?lambda_key, #{}).
-spec get_lambda_funs() -> term().
get_lambda_funs() -> erase(?lambda_key).
get_lambda_funs() ->
Lambdas = erase(?lambda_key),
%% Remove name feed entries and leave only actual functions
maps:filter(fun({fresh, _}, _) -> false;
(_, _) -> true
end, Lambdas).
-spec add_lambda_fun(fun_name(), fann(), fun_def()) -> fun_name().
add_lambda_fun(Parent, FAnn, Def) ->