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

Incorrect delegation from String to ViewString #541

Open
fingolfin opened this issue Oct 11, 2022 · 1 comment
Open

Incorrect delegation from String to ViewString #541

fingolfin opened this issue Oct 11, 2022 · 1 comment

Comments

@fingolfin
Copy link
Member

The GAP library has a bewildering number of functions for printing/viewing/displaying objects to the terminal or into a string. There is a strict hierarchy how methods for the various involved operations may delegate, described in the GAP reference manual.

The following method violates this:

InstallMethod( String,
"for homalg matrices",
[ IsHomalgMatrix ],
ViewString );

To fix this, just install the ViewString method for IsHomalgMatrix as a method for String instead and then delegate "the other way around".

@mohamed-barakat
Copy link
Member

If I do the proposed change the test suite fails for the following reason: ViewString is an operation that alters its output depending on how much the matrix knows about itself, contrary to String which is an attribute.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants