Erlang Help Docs on Elixir Shell - Using ASDF or Kerl

Sep 19, 2020

Note: Proceed if you’re already using ASDF or Kerl for Elixir/Erlang Version Management

Elixir is very well known for it’s documentation and community involvement and most of the developers, when they adopt elixir, they first struggle to find the help documentation for erlang functions.

We all would have come across this message when using:

iex(1)> h :heart
**heart module not compiled with erlang docs 

So, how do we enable documentation for erlang functions:

The solution that I’m going to discuss is relevant with ASDF or Kerl.

Asdf is a popular version manager for multiple softwares. Kerl is a popular version manager for erlang. Asdf internally uses kerl for downloading, building and installing erlang.

Put this environment variable before installing erlang

$ export KERL_BUILD_DOCS=yes

Before installing erlang the following packages are also needed for building documentation

$ apt install xsltproc fop

You need atleast erlang otp-23+ for enabling documentation

Reinstall Erlang and go into the Iex Shell:

Erlang-Documentation-on-Elixir-IEx-Shell-screenshot

Hope, this helps some of you! Stay tuned for more…..


   elixir (5) , erlang (8) , help (1) , documentation (1) , iex (1)