[erlang-questions] edoc documenting macros and records?

Paul Fisher pfisher@REDACTED
Mon Mar 31 03:26:58 CEST 2008


Is there any way to provide documentation with edoc for macro and record
definitions?

I know that macros are generally frowned upon, but I've got several that
cover-up the use of ?MODULE and ?LINE, and I would like to document
them.  I cannot figure out any way to provide documentation using the
edoc in R12B-1.

>From the perspective of records, the only way that i've come up to
include the additional information regarding the names of the fields is
the following:

%% @type therec() = {therec, field1, field2, field3}
%%       field1 = atom()
%%       field2 = string()
%%       field3 = binary()
%%
-record(therec, {
        field1 :: atom(),
        field2 :: string(),
        field3 :: binary()
}).

Is there something I'm missing that allows more direct support for
documenting records?  (What I would love is direct support for EEP8,
allowing inline comments for each field, but that is the subject of my
other edoc question ;->)


-- 
paul




More information about the erlang-questions mailing list