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

**URL:** <https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011>\
**Category:** App Development\
**Tags:** features and bugs\
**Created:** [February 25, 2022, 4:03pm UTC](https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011 "2022-02-25T16:03:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [February 25, 2022, 4:03pm UTC](https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011/1 "2022-02-25T16:03:51Z")

</div>

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](https://github.com/digital-asset/daml/tree/d2e2c21684e2d9eade40f74990208125ad4b4ccb/docs) of the Daml Github repo.

The code for illustrating e.g. the [Exception Handling](https://docs.daml.com/daml/intro/8_Exceptions.html) section of the Daml docs, can be found [here](https://github.com/digital-asset/daml/blob/d2e2c21684e2d9eade40f74990208125ad4b4ccb/docs/source/daml/intro/daml/daml-intro-8/daml/Intro/Exceptions.daml).

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.

---

<div class="post-metadata">

**Author:** ![Ben\_M](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/ben_m/32/3080_2.png) [@Ben\_M](https://forum.canton.network/u/Ben_M)\
**Post date:** [February 25, 2022, 8:12pm UTC](https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011/2 "2022-02-25T20:12:12Z")

</div>

Upvote ☝🏻

Excellent suggestion, I have wanted this previously as well.

---

<div class="post-metadata">

**Author:** ![nemanja](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/nemanja/32/842_2.png) [@nemanja](https://forum.canton.network/u/nemanja)\
**Post date:** [February 27, 2022, 9:11am UTC](https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011/3 "2022-02-27T09:11:53Z")

</div>

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

cc @claben @jennifer

---

<div class="post-metadata">

**Author:** ![gyorgybalazsi](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gyorgybalazsi/32/684_2.png) [@gyorgybalazsi](https://forum.canton.network/u/gyorgybalazsi)\
**Post date:** [February 27, 2022, 9:16am UTC](https://forum.canton.network/t/suggestion-link-the-source-files-of-the-example-code-snippets-in-the-daml-docs/4011/4 "2022-02-27T09:16:53Z")

</div>

Thanks!
