Quantcast

edoc: documenting "-type"

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

edoc: documenting "-type"

Daniel Goertzen-3
I am trying to document a "-type" close to the top of my modules like this...

%% @doc This type is awesome.  Really, it is great.
-type key() :: binary() | atom().

... but it collides with my module @doc entry above it ("multiple @doc
tag" error).


Is there a right way to document types or is this not supported right
now?  The generated documentation shows all my types nicely, but I'd
love to have a bit of explanation appear with them.

Thanks,
Dan.
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: edoc: documenting "-type"

Richard Carlsson-3
On 2011-07-12 23:25, Daniel Goertzen wrote:

> I am trying to document a "-type" close to the top of my modules like this...
>
> %% @doc This type is awesome.  Really, it is great.
> -type key() :: binary() | atom().
>
> ... but it collides with my module @doc entry above it ("multiple @doc
> tag" error).
>
> Is there a right way to document types or is this not supported right
> now?  The generated documentation shows all my types nicely, but I'd
> love to have a bit of explanation appear with them.

It's not supported right now, but it's a good idea. Thanks.

     /Richard
_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: edoc: documenting "-type"

Lukas Larsson-3
Hi,

It is not supported via the traditional edoc syntax, however it is supported by the new type documentation generation. If you write

-type key() :: binary() | atom().
%% This type is awesome.  Really, it is great.

The comment below the type will be included in the generated edoc.

Lukas

On Wed, Jul 13, 2011 at 8:49 AM, Richard Carlsson <[hidden email]> wrote:
On 2011-07-12 23:25, Daniel Goertzen wrote:
I am trying to document a "-type" close to the top of my modules like this...

%% @doc This type is awesome.  Really, it is great.
-type key() :: binary() | atom().

... but it collides with my module @doc entry above it ("multiple @doc
tag" error).

Is there a right way to document types or is this not supported right
now?  The generated documentation shows all my types nicely, but I'd
love to have a bit of explanation appear with them.

It's not supported right now, but it's a good idea. Thanks.

   /Richard

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Loading...