Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Add links to source code for functions #154

Open
johnridesabike opened this issue Mar 31, 2020 · 4 comments
Open

Add links to source code for functions #154

johnridesabike opened this issue Mar 31, 2020 · 4 comments
Labels
docs Technical writing

Comments

@johnridesabike
Copy link
Contributor

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.

@ryyppy
Copy link
Member

ryyppy commented Mar 31, 2020

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

@ryyppy ryyppy added the docs Technical writing label Mar 31, 2020
@mlms13
Copy link

mlms13 commented Mar 31, 2020

Upstream odoc issue: ocaml/odoc#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.

@rizo
Copy link

rizo commented Mar 31, 2020

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).

@HuStmpHrrr
Copy link

any news?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
docs Technical writing
Projects
None yet
Development

No branches or pull requests

5 participants