edoc and -compile(export_all)

Michael McDaniel erlangX@REDACTED
Fri Aug 18 16:49:36 CEST 2006


On Fri, Aug 18, 2006 at 11:06:24AM +0200, Richard Carlsson wrote:
> 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
> 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

 I would like to see edoc recognize -compile(export_all) when using
 a (your choice) option.

 There are times when I would like to make my docs for *all* funs.
 Enabling the special case using an option would be useful to me.
 That way I can make my "internal docs" that I then remove from the
 public doc package I deliver.

 I also like that edoc reminds me when I forget to drop the export_all
 so I like the default case of empty page.

~Michael



More information about the erlang-questions mailing list