I think it could be useful to have a way to go from the documentation of a function to it's source code. Both the rust docs and hoogle have a similar functionality.
I personally look at the source of functions if I need something similar to what a function provides, or if I want to understand it better. Having the ability to go from docs to source in one click is really nice in that case
I agree! I'm not sure what the best way to do this is though, given that source code can be hosted in a variety of different places
like Rust docs also include the whole source code, but personally I always find that annoying because I'd rather see it in the context of the actual repo (e.g. on github.com linked to a particular line number)
but since the docs don't currently know where the repo is, and also don't know what the repo's format is (I definitely don't want to hardcode any GitHub-specific things into the roc CLI, or any other third-party tool)...I'm not sure how someone could specify that :sweat_smile:
Richard Feldman said:
like Rust docs also include the whole source code, but personally I always find that annoying because I'd rather see it in the context of the actual repo (e.g. on github.com linked to a particular line number)
Same here. And I think haskell does something similar to rust there with the docs. I don't know of a solution to that though
Is there a plan to have some sort of config file in the future (Cargo.toml for rust, or .cabal for haskell). Maybe some similar file could include an optional link to the source?
It would also be hard because not everyone uses github to host there code
the plan is never to have a cargo.toml equivalent, always do everything in .roc files
but we can put optional metadata in the module header if we want to
So things like version numbers would go there as well?
I haven't been following the upcoming module/package system, so I'm sorry if the answer is somewhere else on zulip
potentially, although I'm actually not sure if version numbers will need to be in files at all (we'll see!)
Last updated: Jun 16 2026 at 16:19 UTC