JuliaDocs / JuliaDocs/DocStringExtensions.jl
Display parametric types in a better way?
Open
Nobody has claimed this yet.
- Dominant language
- Julia
- Stars
- 126
- Forks
- 35
- PR merge metrics
- No merged PRs in 30d
Description
Consider the following two functions in module CGP.
"""
$(TYPEDSIGNATURES)
"""
function fun1(x::AbstractVector{<:Real})
end
"""
$(TYPEDSIGNATURES)
"""
function fun2(x::AbstractVector{T}) where T<:Real
end
The following documentation is produced.

I noticed two issues.
- The
AbstractVectorinfun2becomesAbstractArrayagain even if I am using Julia 1.6.0. (See #108) - In
fun1, the implicit type parameter is an uglyvar"#s2". Is it possible to just show the original formx::AbstractVector{<:Real}?
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
Start by reproducing the documentation output for the CGP module examples fun1 and fun2 using Julia 1.6.0, then trace the DocStringExtensions signature-rendering entry point involved in TYPEDSIGNATURES. Done means the parametric signatures retain AbstractVector and present the implicit bound without the generated var"#s2" name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- julia
- Domain
- documentation
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100