Improve display of builtin types by the toplevel#13053
Merged
Merged
Conversation
Contributor
Author
|
Sorry I had a problem of mixed commits with another PR that is already merged. I'll try to clean up the diffs |
Octachron
reviewed
Mar 27, 2024
90c620b to
ee9c365
Compare
ee9c365 to
efb49fa
Compare
Contributor
Author
|
Ok, I managed to clean up the code, this should help reviewing |
Octachron
approved these changes
Apr 2, 2024
Member
Octachron
left a comment
There was a problem hiding this comment.
This is a clear improvement with a minimal code complexity cost. Even if not all possible cases are not handled, the more confusing one should be covered. In particular, using
open Listdoesn't break the toplevel list printer anymore.
Thus I think it is better to merge this PR. Thanks!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently the toplevel uses type information to know how to display types such as lists.
However this works only if the type is exactly the builtin types and not an alias.
Thus the some examples are not displayed as nicely as they could :
The change proposed by this PR is to check if a type correspond to a builtin type through aliases to detect more occurrences of builtin types.