elixir icon indicating copy to clipboard operation
elixir copied to clipboard

Allowing documentation for types

Open pminten opened this issue 13 years ago • 5 comments

Currently there's no way to add documentation to types. We've discussed this on the mailing list and two possible approaches have come up:

@typedoc "Frobinicator"
@type foo ::any() 

and

@doc "Frobinicator"
@type foo ::any() 

The consensus that was reached is that the implementer of this feature may decide, there are no strong opinions in favor of one or the other (though @ericmj has expressed a slight preference for @doc on the argument that it doesn't add another language constructs).

pminten avatar Aug 19 '13 09:08 pminten

I'm working on this, using the @doc approach.

pminten avatar Aug 19 '13 09:08 pminten

@pminten Please go ahead with @typedoc. They are going to be stored in different places, so I do believe we should make a distinction in between them. :)

josevalim avatar Aug 19 '13 10:08 josevalim

Ok. Any preference on where to store the documentation? I was thinking of adding a :typedoc accumulating persistent attribute to every module with a keyword list of {typename, doc}.

pminten avatar Aug 19 '13 10:08 pminten

I was thinking of adding a :typedoc accumulating persistent attribute to every module with a keyword list of {typename, doc}.

Perfect. It should be stored as attribute as everything else spec related.

josevalim avatar Aug 19 '13 10:08 josevalim

Closing this in favor of the pull request.

josevalim avatar Sep 10 '13 14:09 josevalim