Suggestion: link the source files of the example code snippets in the Daml docs

In the Daml documentation we have code snippets illustrating the concepts being explained.

The code snippets cannot be used in themselves, e.g. by copy / pasted in the appropriate part of my code, because of the missing module imports.

It turns out that the code snippets are snippets from actually working code files, batteries included, residing in the docs folder of the Daml Github repo.

The code for illustrating e.g. the Exception Handling section of the Daml docs, can be found here.

It’s not so easy to find the source files of the snippets though, I could find this file by searching for a word which I thought should not be found many times in the repo: TransferLimitExceeded. And indeed, there are only two hits.

It would be easier to use the docs, if the links to the source code of the snippets were included in the respective chapters.

3 Likes

Upvote :point_up:t2:

Excellent suggestion, I have wanted this previously as well.

2 Likes

Thanks for the feedback on the @gyorgybalazsi :slight_smile: We’ll try to address it with future iterations of the docs!

cc @claben @jennifer

1 Like

Thanks!