[erlang-questions] edoc: documenting behaviours callback and preprocessor macros

76 views
Skip to first unread message

Francesco Mazzoli

unread,
Aug 24, 2012, 10:45:47 AM8/24/12
to Erlang Questions
Hi list,

I have two questions about edoc:

1. Is it possible to document behaviour callbacks? I have to use the old
`behaviour_info/1' form for compatibility reason.

2. Is there any nice way to embed values defined in preprocessor macros in
edoc comments? I'm pretty sure that the answer is "no", but you never
know.

--
Francesco * Often in error, never in doubt
_______________________________________________
erlang-questions mailing list
erlang-q...@erlang.org
http://erlang.org/mailman/listinfo/erlang-questions

Loïc Hoguin

unread,
Aug 24, 2012, 10:46:12 AM8/24/12
to erlang-q...@erlang.org
On 08/24/2012 04:45 PM, Francesco Mazzoli wrote:
> Hi list,
>
> I have two questions about edoc:
>
> 1. Is it possible to document behaviour callbacks? I have to use the old
> `behaviour_info/1' form for compatibility reason.

Not answering but related:

I got an error when trying to @doc a -callback (R15B01), it would be
really nice if I could do that.

--
Loïc Hoguin
Erlang Cowboy
Nine Nines
http://ninenines.eu

Magnus Henoch

unread,
Aug 24, 2012, 11:55:12 AM8/24/12
to Erlang Questions
Francesco Mazzoli <f...@mazzo.li> writes:

> 1. Is it possible to document behaviour callbacks? I have to use the old
> `behaviour_info/1' form for compatibility reason.

There is a patch for making edoc list the callbacks, so that you're no
worse off than with behaviour_info:

https://github.com/erlang/otp/commit/715bb8044600ec16ad6ba97de9d033f6a5c06bfe

It is lined up to be released in R15B02, due 5 September.

Of course, it would be nice if edoc would display the callback types,
and allow documenting callbacks like it does with -type declarations,
but I'm not aware of anyone working on that.

Regards,
Magnus
Reply all
Reply to author
Forward
0 new messages