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

add tuple type printing with Vararg, and port to static_show #44970

Merged
merged 2 commits into from
Apr 14, 2022

Conversation

JeffBezanson
Copy link
Sponsor Member

This adds the ability to print long tuple types with Vararg, and adds the logic for printing as NTuple or Vararg to static_show.

@JeffBezanson JeffBezanson added the domain:display and printing Aesthetics and correctness of printed representations of objects. label Apr 13, 2022
@@ -804,9 +835,7 @@ static size_t jl_static_show_x_(JL_STREAM *out, jl_value_t *v, jl_datatype_t *vt
n += jl_printf(out, ")");
}
}
if (dv->parameters && (jl_value_t*)dv != dv->name->wrapper &&
(jl_has_free_typevars(v) ||
(jl_value_t*)dv != (jl_value_t*)jl_tuple_type)) {
Copy link
Sponsor Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see the jl_tuple_type check was to make sure Tuple is printed as Tuple, but I don't know how the free_typevars check makes sense 🤷

@vtjnash vtjnash added the status:merge me PR is reviewed. Merge when all tests are passing label Apr 13, 2022
@vtjnash vtjnash merged commit 858fa05 into master Apr 14, 2022
@vtjnash vtjnash deleted the jb/tupleprint branch April 14, 2022 20:30
@DilumAluthge DilumAluthge removed the status:merge me PR is reviewed. Merge when all tests are passing label Apr 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:display and printing Aesthetics and correctness of printed representations of objects.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants