External Documentation Packages

I have recently found how powerful the h command in iex is. It is however limited to packages with documentation, in particular it excludes the Erlang core libraries. This got me thinking, could we use an extension method where an Elixir package could have something like a Protocol that could be used to provide documentation on an external module? This would provide a great tool to prevent the reinvention of the wheel.

Has this been considered before?

On a related note we could use this as an Extension to Rebar to provide Erlang documentation for Elixir packages which may help bridge the Erlang and Elixir communities.

2 Likes

José Valim contributed the EEP 48, which as far as I know has been accepted. It describes how members of the BEAM ecosystem shall embed their documentation into the compiled modules.

Currently only elixir actually implements it. Erlang will do so from OTP 22 IIRC, so it will start in a couple of months.

I’m not sure what the state of LFE, Alpaca and others is currently.

2 Likes