Open johnridesabike opened 4 years ago
That's a task for the odoc-json tool... definitely worth considering, but not sure how much effort it would be (so might end up lower on the prio list)
\cc @rizo
Upstream odoc issue: https://github.com/ocaml/odoc/issues/128
This would be a fantastic addition. PureScript's docs have this, and I can't count how many times it's been incredibly valuable to take a quick look at the source to see how an implementation works.
I will look into the odoc side of things to evaluate how hard it would be to implement this in an automatic way. I agree that, if doable, it would be great to have this information included in the JSON output.
An approach that could work as a workaround is adding a custom doc attribute to link to the implementation (something like @src path/to/Module.re#L30
).
I think it would be useful to have links to the source code with the function definitions. For BuckleScript, it may be also be good to link to the compiled JS source in addition to the OCaml/Reason source.