Maybe just use isdefined
:
julia> module M
macro m() :() end
end
Main.M
julia> isdefined(M, Symbol("@m"))
true
so:
if !isdefined(@__MODULE__, Symbol("@mymacro"))
macro mymacro(ex)
esc(ex)
end
end
Maybe just use isdefined
:
julia> module M
macro m() :() end
end
Main.M
julia> isdefined(M, Symbol("@m"))
true
so:
if !isdefined(@__MODULE__, Symbol("@mymacro"))
macro mymacro(ex)
esc(ex)
end
end