[erlang-questions] EDOC and remote type's specification
Ivan Carmenates García
Thu Aug 8 19:34:34 CEST 2013
I think this has to do a little with what Nikolaos Bezirgiannis was saying
about edoc generation and types,
I have this little thing when I was implementing a log module for a
project I am developing.
For example I use a remote type specification for my own function
specification like this:
-type log_opt() :: show | write | log.
%% Functions specification.
%% @doc Logs events information for the system.
%% When <code>Opts</code> is:
%% <li><code>show</code> logs to the system console.</li>
%% <li><code>write</code> logs to the solid state storage.</li>
%% <li><code>log</code> logs to both system console and solid state
%% <li><code>error</code> logs errors to both system console and solid
%% in a special error format.</li>
-spec log_event(Opts, FormattedStr, Args) -> ok | error when
Opts :: log_opt(),
FormattedStr :: io:format(),
Args :: term().
The one in red (io:format()) is an exported type from io module, once I
generate the documentation for the module, using edoc:file/1 in this case
this function is deprecated but I think it works for the propose, this
generate a html documentation including links for the local type log_opt()
and the remote type io:format(), the link for my own local type is well, the
problem is with the imported type (remote one), when I click the io:format()
link it of course try to find it in the working directory of my project, how
(if its worth) I can refer to the truly type definition in the io module
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions