JuliaApproximation / JuliaApproximation/ContinuumArrays.jl
simplify macro does not permit templating?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 31
- Forks
- 6
- Avg merge
- 9d 22h
- Merged PRs (30d)
- 2
Description
I assume that's what's wrong with this
julia> using QuasiArrays, ContinuumArrays
julia> import ContinuumArrays: @simplify
julia> struct MyOp{T,Ax} <: QuasiArrays.LazyQuasiMatrix{T}
axis::Ax
end
julia> @simplify function *(A::MyOp, P::Basis{T}) where T
P * Diagonal(1:∞)
end
ERROR: LoadError: AssertionError: (qt.args[1]).head == :call
Stacktrace:
[1] var"@simplify"(__source__::LineNumberNode, __module__::Module, qt::Any)
@ ContinuumArrays ~/.julia/packages/ContinuumArrays/tg4mj/src/operators.jl:21
in expression starting at REPL[5]:1
Maybe it's not an issue because macros work with types?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Julia example and inspect the @simplify implementation at src/operators.jl:21, especially the assertion reported in the stack trace. Determine whether the macro is intended to accept the type-parameterized method shown; done means establishing the expected behavior and either correcting it or documenting the limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100