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

Rule for typed_vcat? #695

Open
ToucheSir opened this issue Feb 19, 2023 · 1 comment
Open

Rule for typed_vcat? #695

ToucheSir opened this issue Feb 19, 2023 · 1 comment
Labels
help wanted Extra attention is needed missing rule

Comments

@ToucheSir
Copy link
Contributor

Mainly because the vcat literal syntax lowers to this:

julia> Meta.@lower Int[1; 2; 3]
:($(Expr(:thunk, CodeInfo(
    @ none within `top-level scope`
1 ─ %1 = Base.typed_vcat(Int, 1, 2, 3)
└──      return %1
))))
@mcabbott mcabbott added help wanted Extra attention is needed missing rule labels Feb 19, 2023
@mcabbott
Copy link
Member

Similarly Int[1 2 3] and Float32[1 2; 3 4]. Ideally these would share as much code as possible with the existing cat rules, perhaps just changing a few lines.

Maybe worth mentioning that typed comprehensions are much harder: Meta.@lower Int[x^2 for x in 1:3].

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed missing rule
Projects
None yet
Development

No branches or pull requests

2 participants