Skip to content

Commit

Permalink
Fix printing FCode with lifted lambdas (#501)
Browse files Browse the repository at this point in the history
  • Loading branch information
radrow authored Feb 4, 2024
1 parent 44d6982 commit 1387e81
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/aeso_ast_to_fcode.erl
Original file line number Diff line number Diff line change
Expand Up @@ -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) ->
Expand Down

0 comments on commit 1387e81

Please sign in to comment.