Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
home:Ledest:erlang:24
erlang
6744-erl_docgen-Reverse-order-of-equiv-function...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 6744-erl_docgen-Reverse-order-of-equiv-functions.patch of Package erlang
From 00c52fb67d668de8535ce49104c6b92ce4229c7b Mon Sep 17 00:00:00 2001 From: Lukas Larsson <lukas@erlang.org> Date: Fri, 15 Sep 2023 13:00:38 +0200 Subject: [PATCH 4/7] erl_docgen: Reverse order of @equiv functions To the order is that the more general functions are equivalent to the more specific ones. --- lib/erl_docgen/src/docgen_xml_to_chunk.erl | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/erl_docgen/src/docgen_xml_to_chunk.erl b/lib/erl_docgen/src/docgen_xml_to_chunk.erl index 8d0765514f..195ce7fdd2 100644 --- a/lib/erl_docgen/src/docgen_xml_to_chunk.erl +++ b/lib/erl_docgen/src/docgen_xml_to_chunk.erl @@ -560,7 +560,7 @@ func2func({func,Attr,Contents}) -> _ = VerifyNameList(NameList,fun([]) -> ok end), FAs = [TagsToFA(FAttr) || {name,FAttr,[]} <- NameList ], - SortedFAs = lists:usort(FAs), + SortedFAs = lists:reverse(lists:usort(FAs)), FAClauses = lists:usort([{TagsToFA(FAttr),proplists:get_value(clause_i,FAttr)} || {name,FAttr,[]} <- NameList ]), @@ -584,7 +584,7 @@ func2func({func,Attr,Contents}) -> fun(FA) -> MakeFunc(FA, MD, []) end, tl(SortedFAs)), - [Base | Equiv]; + lists:reverse([Base | Equiv]); NameList -> %% Manual style function docs FAs = lists:foldl( @@ -599,7 +599,7 @@ func2func({func,Attr,Contents}) -> _ = VerifyNameList(NameList,fun([_|_]) -> ok end), - SortedFAs = lists:usort(maps:to_list(FAs)), + SortedFAs = lists:reverse(lists:usort(maps:to_list(FAs))), {{BaseF, BaseA}, BaseSig} = hd(SortedFAs), @@ -608,12 +608,14 @@ func2func({func,Attr,Contents}) -> {meta,SinceMD}], Anchors ++ ContentsNoName}, + {EquivKind, EquivF} = func_to_atom(BaseF), + Equiv = [{function, [{name,F},{arity,A}, {signature,Signature}, - {meta,SinceMD#{ equiv => {function,list_to_atom(BaseF),BaseA}}}],[]} + {meta,SinceMD#{ equiv => {EquivKind,EquivF,BaseA}}}],[]} || {{F,A},Signature} <- tl(SortedFAs)], - [Base | Equiv] + lists:reverse([Base | Equiv]) end, transform(Functions,[]). -- 2.35.3
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor