# Documenting a parametric callable struct

**URL:** https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135
**Category:** General Usage
**Tags:** documentation
**Created:** [April 7, 2022, 2:12am UTC](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135 "2022-04-07T02:12:40Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jae-Mo\_Lihm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jae-mo_lihm/32/20145_2.png) [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)
#### Post date: [April 7, 2022, 2:12am UTC](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135/1 "2022-04-07T02:12:40Z")

</div>

I want to document a callable, parametric struct, but the docstring for the function does not show up.

This question is similar to [Documenting a functor / callable struct](https://discourse.julialang.org/t/documenting-a-functor-callable-struct/8444), but the fix ([https://github.com/JuliaLang/julia/pull/25626](https://github.com/JuliaLang/julia/pull/25626)) does not seem to work for parametric callable structs.

```julia
"""Docs for Parametric struct """
struct Parametric{T} end

"""Docs for Parametric func"""
function (f::Parametric{T})(x) where {T} end

"""Docs for NonParametric struct """
struct NonParametric end

"""Docs for NonParametric func"""
function (f::NonParametric)(x) end

@doc Parametric
@doc NonParametric

```

Output:

```julia
julia> @doc Parametric
  Docs for Parametric struct

julia> @doc Parametric{Int}
  Docs for Parametric struct

julia> @doc NonParametric
  Docs for NonParametric struct

  Docs for NonParametric func

```

---

<div class="post-metadata">

### Author: ![thofma](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/thofma/32/1691_2.png) [@thofma](https://discourse.julialang.org/u/thofma)
#### Post date: [April 7, 2022, 5:14am UTC](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135/2 "2022-04-07T05:14:07Z")

</div>

It puts the docstring on the symbol `f`:

```julia
julia> @doc f
  Docs for Parametric func

```

Probably a bug.

---

<div class="post-metadata">

### Author: ![Jae-Mo\_Lihm](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jae-mo_lihm/32/20145_2.png) [@Jae-Mo\_Lihm](https://discourse.julialang.org/u/Jae-Mo_Lihm)
#### Post date: [April 7, 2022, 5:41am UTC](https://discourse.julialang.org/t/documenting-a-parametric-callable-struct/79135/3 "2022-04-07T05:41:19Z")

</div>

Thanks. I opened an issue: [https://github.com/JuliaLang/julia/issues/44889](https://github.com/JuliaLang/julia/issues/44889)
