Can you generate documentation of types for bindings?


Is there a way to extract types to show it in a more general way on redex? If there is no examples in the Readme on redex you often have to dig into the repo, and find the repo.

Is there a way like JSDoc where you can pull out the types automatically and show it?

Like these are the four most popular according to the frontpage:

And they are all really different.


There’s been several efforts working towards that. The one that’s furthest along is @jaredly’s redoc I think. I also think @ostera has worked pretty hard to achieve this, but don’t know what the status is on that.

As for redex, having an example in the readme is almost required to be included these days. Otherwise they should be marked as neglected. There are some exceptions though, such as reason-react which gets a pass for having an extensive documentation site instead.

A repository URL is also required to be included, so you shouldn’t have to look very long to find the repo. It’s in the same place at the bottom of the header for every package listed on redex.


redoc looks interesting, looks like it goes for a full approach.

I tried ocamldoc, but the html and latex did not output the definitions for a simple add function, only man and texi did, which are formats I have no experience with.

-html Generate HTML documentation
-latex Generate LaTeX documentation
-texi Generate TeXinfo documentation
-man Generate man pages

Could be nice with a output in xml or json, but I can’t see that anywhere