Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete CAP_INTERNAL_GET_CORRESPONDING_OUTPUT_OBJECTS #1402

Merged
merged 1 commit into from
Jul 31, 2023
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 CAP/PackageInfo.g
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ SetPackageInfo( rec(

PackageName := "CAP",
Subtitle := "Categories, Algorithms, Programming",
Version := "2023.07-07",
Version := "2023.07-08",
Date := (function ( ) if IsBound( GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE ) then return GAPInfo.SystemEnvironment.GAP_PKG_RELEASE_DATE; else return Concatenation( ~.Version{[ 1 .. 4 ]}, "-", ~.Version{[ 6, 7 ]}, "-01" ); fi; end)( ),
License := "GPL-2.0-or-later",

Expand Down
2 changes: 1 addition & 1 deletion CAP/gap/LimitConvenience.gi
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ end );
Assert( 0, Length( limit.diagram_morphism_filter_list ) <= 1 );
Assert( 0, Length( limit.diagram_morphism_input_type ) <= 1 );

input_arguments_names := Concatenation( [ "cat" ], functorial_with_given_record.io_type[1] );
input_arguments_names := functorial_with_given_record.input_arguments_names;

source_argument_name := input_arguments_names[2];
range_argument_name := Last( input_arguments_names );
Expand Down
3 changes: 3 additions & 0 deletions CAP/gap/MethodRecord.gi
Original file line number Diff line number Diff line change
Expand Up @@ -4910,6 +4910,9 @@ InstallGlobalFunction( CAP_INTERNAL_ENHANCE_NAME_RECORD,

fi;

# io_type is deprecated -> make sure it is not used except here
Unbind( current_rec.io_type );

fi;

if ForAll( current_rec.filter_list, x -> x in [ "element_of_commutative_ring_of_linear_structure", "integer", "nonneg_integer_or_infinity", "category", "object", "object_in_range_category_of_homomorphism_structure", "list_of_objects" ] ) then
Expand Down
2 changes: 0 additions & 2 deletions CAP/gap/ToolsForCategories.gd
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,6 @@ DeclareGlobalFunction( "CAP_INTERNAL_FIND_APPEARANCE_OF_SYMBOL_IN_FUNCTION" );
#! lists only contains this pair once, with the higher multiple from both lists.
DeclareGlobalFunction( "CAP_INTERNAL_MERGE_PRECONDITIONS_LIST" );

DeclareGlobalFunction( "CAP_INTERNAL_GET_CORRESPONDING_OUTPUT_OBJECTS" );

#! @Arguments data_type, human_readable_identifier_list
#! @Description
#! Returns a unary function which throws an error if its argument is not of type <A>data_type</A>.
Expand Down
83 changes: 0 additions & 83 deletions CAP/gap/ToolsForCategories.gi
Original file line number Diff line number Diff line change
Expand Up @@ -812,89 +812,6 @@ InstallGlobalFunction( CAP_INTERNAL_MERGE_PRECONDITIONS_LIST,

end );

InstallGlobalFunction( CAP_INTERNAL_GET_CORRESPONDING_OUTPUT_OBJECTS,

function( translation_list, function_input )
local input_list, output_list, current_output, return_list, input_position, list_position, i;

if not Length( translation_list ) = 2 then
Error( "invalid translation list" );
fi;

output_list := translation_list[ 2 ];

output_list := List( output_list, i -> SplitString( i, "_" ) );

input_list := translation_list[ 1 ];

return_list := [ ];

for i in [ 1 .. Length( output_list ) ] do

current_output := output_list[ i ];

input_position := Position( input_list, current_output[ 1 ] );

if input_position = fail then

return_list[ i ] := fail;

continue;

fi;

if Length( current_output ) = 1 then

return_list[ i ] := function_input[ input_position ];

elif Length( current_output ) = 2 then

if LowercaseString( current_output[ 2 ] ) = "source" then
return_list[ i ] := Source( function_input[ input_position ] );
elif LowercaseString( current_output[ 2 ] ) = "range" then
return_list[ i ] := Range( function_input[ input_position ] );
elif Position( input_list, current_output[ 2 ] ) <> fail then
return_list[ i ] := function_input[ input_position ][ function_input[ Position( input_list, current_output[ 2 ] ) ] ];
else
Error( "wrong input type" );
fi;

elif Length( current_output ) = 3 then

if ForAll( current_output[ 2 ], i -> i in "0123456789" ) then
list_position := Int( current_output[ 2 ] );
else
list_position := Position( input_list, current_output[ 2 ] );
if list_position = fail then
Error( "unable to find ", current_output[ 2 ], " in input_list" );
fi;
list_position := function_input[ list_position ];
fi;

if list_position = fail then
Error( "list index variable not found" );
fi;

if LowercaseString( current_output[ 3 ] ) = "source" then
return_list[ i ] := Source( function_input[ input_position ][ list_position ] );
elif LowercaseString( current_output[ 3 ] ) = "range" then
return_list[ i ] := Range( function_input[ input_position ][ list_position ] );
else
Error( "wrong output syntax" );
fi;

else

Error( "wrong entry length" );

fi;

od;

return return_list;

end );

##
InstallGlobalFunction( ListKnownCategoricalProperties,

Expand Down