edoc and -compile(export_all)

Richard Carlsson <>
Fri Aug 18 11:06:24 CEST 2006


Anders Nygren wrote:
> HI I just noticed that edoc does not recognize 
> -compile(export_all) So if a module has -compile(export_all)
> then edoc will just generate an empty page, I assume because
> there are no export statements.

It is a design decision. Note that -compile(export_all) is not
part of the language, but is rather a compiler pragma.
Syntactically, it's just another "wild" attribute on the form
-foo(bar) - it has no special meaning in the language itself,
only to the Beam compiler. Also, sometimes people forget an
export_all declaration in their code, so even if edoc would
recognize such pragmas, I don't think it should obey them
by default, but only if some option was turned on.

I generally feel that using export_all instead of listing your
exports in production code (i.e., excluding debugging purposes)
promotes sloppy programming, but in some special cases it might
be a reasonable thing to do. If you (anyone) feel that you really
do need (honestly) such an option, then speak up now or forever
hold your peace.

	/Richard




More information about the erlang-questions mailing list