Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion patches/stdlib/gen_server.erl
Original file line number Diff line number Diff line change
Expand Up @@ -797,7 +797,7 @@ format_status(Opt, StatusData) ->
end,
Header = lists:concat(["Status for generic server ", NameTag]),
Log = sys:get_debug(log, Debug, []),
Specific =
Specific =
case erlang:function_exported(Mod, format_status, 2) of
true ->
case catch Mod:format_status(Opt, [PDict, State]) of
Expand Down
15 changes: 8 additions & 7 deletions src/gproc.erl
Original file line number Diff line number Diff line change
Expand Up @@ -2895,17 +2895,18 @@ monitor_me() ->
end.


pattern(L, Ctxt) when is_list(L) ->
[pattern_(P, Ctxt) || P <- L].


pattern([{'_', Gs, As}], T) ->
pattern_({'_', Gs, As}, T) ->
?l,
{HeadPat, Vs} = headpat(T, '$1', '$2', '$3'),
[{HeadPat, rewrite(Gs,Vs), rewrite(As,Vs)}];
pattern([{{A,B,C},Gs,As}], Scope) ->
{HeadPat, rewrite(Gs,Vs), rewrite(As,Vs)};
pattern_({{A,B,C},Gs,As}, Scope) ->
?l,
{HeadPat, Vars} = headpat(Scope, A,B,C),
[{HeadPat, rewrite(Gs,Vars), rewrite(As,Vars)}];
pattern([{Head, Gs, As}], Scope) ->
{HeadPat, rewrite(Gs,Vars), rewrite(As,Vars)};
pattern_({Head, Gs, As}, Scope) ->
?l,
{S, T} = get_s_t(Scope),
case is_var(Head) of
Expand All @@ -2914,7 +2915,7 @@ pattern([{Head, Gs, As}], Scope) ->
Vs = [{Head, obj_prod()}],
%% the headpat function should somehow verify that Head is
%% consistent with Scope (or should we add a guard?)
[{HeadPat, rewrite(Gs, Vs), rewrite(As, Vs)}];
{HeadPat, rewrite(Gs, Vs), rewrite(As, Vs)};
false ->
erlang:error(badarg)
end.
Expand Down