How to merge docstrings of constructors with and without type parameters?

I have a struct

struct HalfIntArray{T,N,A<:AbstractArray} <: AbstractHalfIntegerArray{T,N}
    parent :: A
    offsets :: NTuple{N,HalfInt}
end

for which I have two different sets of constructors:

"""
docstring 1
"""
HalfIntArray(A::AbstractArray, indices::AbstractUnitRange...)

and

"""
docstring 2
"""
HalfIntArray{T}(init, indices::AbstractUnitRange...)

I am trying to document both the constructors. The two docstrings work correctly in the REPL’s help mode, but I’m struggling to combine the docstrings using Documenter into one box. I have tried

@docs
HalfIntArray

but this only adds the first docstring. If I explicitly try to add the second using

@docs
HalfIntArray
HalfIntArray{T}

I obtain a warning about duplicate entries. Any help?

Btw this is my first time using Documenter so it’s quite possible that I am missing something obvious.

I am not sure I understand the issue, but I don’t think that is merging docstrings is possible. Since they are semantically different constructors anyway, I am not even sure that it would be advisable to merge them. These should be documented like any two functions.

Ah ok.

The issue is that I’m not sure how to display the docstring for the second constructor at all while using @docs, although it does show up if I use @autodocs.

I am sorry I did not understand the original question. This should work (I just tested it):

module X

export Foo

struct Foo{T,S} end

"the default"
Foo() = Foo{Int,Int}()

"one param"
Foo{T}() where T = Foo{T,Int}()

end # module

then in the docs, use the call syntax:

```@docs
Foo()
Foo{T}()
```