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

simply Union inside UnionAll inside Union during construction #49279

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

vtjnash
Copy link
Sponsor Member

@vtjnash vtjnash commented Apr 6, 2023

Allows more opporutunities to discover (and eliminate) repeated components, as well as helping to separate the UnionAll variables into separate domains for subtyping's separability analysis.

(waiting for #49278 before merging this)

Base automatically changed from jn/tailrecurse-type-queries to master April 7, 2023 18:26
vtjnash added a commit that referenced this pull request Apr 7, 2023
We observed a case where simple_tmeet made a Union of egal things, which
is undesirable. There also was no sorting of the result, as it normally
done, and theoretically, simplification with an omit_bad_union to remove
`S` could similar result in a Union that should be further simplified to
remove redundancies.
```
Union{Union{Val{T}, S} where T<:AbstractString, Union{Val{T}, Int64} where T<:AbstractString} where S
```
(In principle, that simplification might also be possible to do during
the original jl_type_union call when flattening it: see #49279)
@vtjnash vtjnash force-pushed the jn/flatten-union-unionall-union branch from 705addf to 139e8a2 Compare April 7, 2023 18:33
@vtjnash vtjnash marked this pull request as ready for review April 7, 2023 18:33
Allows more opporutunities to discover (and eliminate) repeated
components, as well as helping to separate the UnionAll variables into
separate domains for subtyping's separability analysis.
@vtjnash vtjnash force-pushed the jn/flatten-union-unionall-union branch from 139e8a2 to 425fb6e Compare April 8, 2023 15:28
@vtjnash vtjnash added the status:merge me PR is reviewed. Merge when all tests are passing label Apr 8, 2023
@N5N3 N5N3 merged commit 1cf5091 into master Apr 8, 2023
@N5N3 N5N3 deleted the jn/flatten-union-unionall-union branch April 8, 2023 17:27
@N5N3 N5N3 removed the status:merge me PR is reviewed. Merge when all tests are passing label Apr 8, 2023
Xnartharax pushed a commit to Xnartharax/julia that referenced this pull request Apr 19, 2023
We observed a case where simple_tmeet made a Union of egal things, which
is undesirable. There also was no sorting of the result, as it normally
done, and theoretically, simplification with an omit_bad_union to remove
`S` could similar result in a Union that should be further simplified to
remove redundancies.
```
Union{Union{Val{T}, S} where T<:AbstractString, Union{Val{T}, Int64} where T<:AbstractString} where S
```
(In principle, that simplification might also be possible to do during
the original jl_type_union call when flattening it: see JuliaLang#49279)
Xnartharax pushed a commit to Xnartharax/julia that referenced this pull request Apr 19, 2023
…ang#49279)

Allows more opporutunities to discover (and eliminate) repeated
components, as well as helping to separate the UnionAll variables into
separate domains for subtyping's separability analysis.
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

Successfully merging this pull request may close these issues.

None yet

2 participants