For future reference, based on @mkborregaard’s comment, I found a better solution that involves wrapping SolutionUsingAlgorithmB and SolutionUsingAlgorithmC inside a constructor _Convergence defined in A:
module A
...
struct _Convergence{solution_T}
solution::solution_T
end
@userplot CONVERGENCE
@recipe function f(h::CONVERGENCE)
return _Convergence(h.args[1])
end
end
module B
using A
...
@recipe function f(wrappedobject::NSDEBase._Convergence{<:SolutionUsingAlgorithmB})
solution = wrappedobject.solution
...
end
end
and similarly for C. This solution has the non-trivial advantage of allowing for the usage of the usual RecipesBase tricks (for loops of @series, etc) inside the relevant recipes defined in B and C, which otherwise couldn’t be used (that easily) with the previous approach based on _convergence.