JuliaApproximation / JuliaApproximation/ContinuumArrays.jl

simplify macro does not permit templating?

Open
#100 1 comment 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.