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

line breaking hints in the ViewString method for lists #3440

Merged
merged 1 commit into from
May 8, 2019

Conversation

ThomasBreuer
Copy link
Contributor

Description

Up to now, ViewObj and ViewString behaved differently for lists,
due to the prescribed line breaking hints \< and \>.
This was a reason why new ViewString methods for complicated GAP objects
were likely to produce output that looked different from ViewObj output.

With the proposed change, the line breaking hints in the ViewObj and ViewString methods
for finite lists are made consistent with those that appear in the kernel function PrintListDefault.

Only a few test examples are affected by this change, they have been adjusted.

(I think that after this change, it will make sense to add more ViewString methods.)

An open problem is that ViewString cannot handle self-referential objects.
Note that the GAP kernel does some bookkeeping in the case of ViewObj;
an analogous mechanism would be possible also for ViewString.

Text for release notes

Fixed the line breaking hints in the ViewString method for finite lists.

Checklist for pull request reviewers

  • proper formatting

If your code contains kernel C code, run clang-format on it; the
simplest way is to use git clang-format, e.g. like this (don't
forget to commit the resulting changes):

git clang-format $(git merge-base master)
  • usage of relevant labels

    1. either release notes: not needed or release notes: to be added
    2. at least one of the labels bug or enhancement or new feature
    3. for changes meant to be backported to stable-4.X add the backport-to-4.X label
    4. consider adding any of the labels build system, documentation, kernel, library, tests
  • runnable tests

  • adequate pull request title

  • well formulated text for release notes

  • relevant documentation updates

  • sensible comments in the code

Up to now, `ViewObj` and `ViewString` behaved differently for lists,
due to the prescribed line breaking hints `\<` and `\>`.
This was a reason why new `ViewString` methods for complicated
GAP objects were likely to produce output that looked different
from `ViewObj` output.

With the proposed change, the line breaking hints in the `ViewObj`
and `ViewString` methods for finite lists are made consistent
with those that appear in the kernel function `PrintListDefault`.

Only a few test examples are affected by this change,
they have been adjusted.

(I think that after this change, it will make sense to add more
`ViewString` methods.)

An open problem is that `ViewString` cannot handle self-referential objects.
Note that the GAP kernel does some bookkeeping in the case of `ViewObj`;
an analogous mechanism would be possible also for `ViewString`.
@ThomasBreuer ThomasBreuer added kind: bug Issues describing general bugs, and PRs fixing them release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels May 7, 2019
@coveralls
Copy link

Coverage Status

Coverage increased (+0.001%) to 85.147% when pulling 12801e4 on ThomasBreuer:TB_ViewString_lists into 1afd3f7 on gap-system:master.

@ThomasBreuer ThomasBreuer merged commit 578ea99 into gap-system:master May 8, 2019
@ThomasBreuer ThomasBreuer deleted the TB_ViewString_lists branch May 8, 2019 08:06
@DominikBernhardt DominikBernhardt added release notes: added PRs introducing changes that have since been mentioned in the release notes and removed release notes: to be added PRs introducing changes that should be (but have not yet been) mentioned in the release notes labels Aug 21, 2019
@olexandr-konovalov olexandr-konovalov added this to the GAP 4.11.0 milestone Feb 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Issues describing general bugs, and PRs fixing them release notes: added PRs introducing changes that have since been mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants