# Error naming a module

**URL:** <https://forum.canton.network/t/error-naming-a-module/2959>\
**Category:** App Development\
**Tags:** features and bugs\
**Created:** [August 9, 2021, 2:50pm UTC](https://forum.canton.network/t/error-naming-a-module/2959 "2021-08-09T14:50:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dave](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/dave/32/7311_2.png) [@Dave](https://forum.canton.network/u/Dave)\
**Post date:** [August 9, 2021, 2:50pm UTC](https://forum.canton.network/t/error-naming-a-module/2959/1 "2021-08-09T14:50:42Z")

</div>

Hey, I named my file ‘chore.daml’ then named my module ‘Chore’ and the IDE showed the error below:  
‘Module names should always match file names, as per documentation. Please change the filename to Chore.daml.’  
Instead of changing the file name to ‘Chore.daml’ I changed the module name to ‘chore’ however it then showed the following error:  
“parse error on input ‘chore’”  
I assumed that the module name (and therefore the file name) must be capitalised however, I searched the documentation and found the [file structure page here](https://docs.daml.com/daml/reference/file-structure.html) which supports the first error message that the file and module names must be the same however, it doesn’t state that they must both be capitalised.  
I found this question and I tried to close the tabs & VS which didn’t work - [How to fix incorrect module name errors in Daml Studio?](https://discuss.daml.com/t/how-to-fix-incorrect-module-name-errors-in-daml-studio/2186). My issue also isn’t that I renamed a file so I don’t know how much it applies.  
Any help on how to resolve this is much appreciated.  
Thanks, Dave

---

<div class="post-metadata">

**Author:** ![Gary\_Verhaegen](https://yyz2.discourse-cdn.com/flex034/user_avatar/forum.canton.network/gary_verhaegen/32/81_2.png) [@Gary\_Verhaegen](https://forum.canton.network/u/Gary_Verhaegen)\
**Post date:** [August 9, 2021, 2:56pm UTC](https://forum.canton.network/t/error-naming-a-module/2959/2 "2021-08-09T14:56:28Z")

</div>

Module names (and type names) must start with an uppercase letter. If that’s not documented, it definitely should be.

---

<div class="post-metadata">

**Author:** ![quidagis](https://avatars.discourse-cdn.com/v4/letter/q/dbc845/32.png) [@quidagis](https://forum.canton.network/u/quidagis)\
**Post date:** [August 9, 2021, 11:56pm UTC](https://forum.canton.network/t/error-naming-a-module/2959/3 "2021-08-09T23:56:57Z")

</div>

Agree, it is in there but you _have_ to look for it, and the most relevant reference `2.2.2.1 Template name` is actually broken across 2 pages in the .PDF which makes it easy to miss.

Searched the DA\_SDK.pdf using the following terms:

- capital
- module capital
- template capital
- module uppercase
- module capitaliZ/Se

Search results below.

2.2.10.1 File structure

> This file’s module name (module NameOfThisFile where).  
> Part of a hierarchical module system to facilitate code reuse. **Must be the same as the Daml file name** , without the file extension.  
> For a file with path ./Scenarios/Demo.daml, use module Scenarios.Demo where.

Understand the generated classes (Page 377/577)

> The **Java package for the generated classes** is the **equivalent of the lowercase Daml module name**

Develop with Daml Studio (Page 393/577)

> The first **two lines specify language version and module name**

2.2.1.2 Choice structure (Page 111/577)

> a name **Must begin with a capital letter**. Must be unique - choices in different templates can’t have the same name

2.2.2.1 Template name (Pages 112-113/577)

> This is the name of the template. It’s preceded by template keyword. **Must begin with a capital letter**. This is the highest level of nesting.

As far as `Type` requiring a `CAPITAL` I did not see it.

Searched using:

- type name
- type capital
- type uppercase
- type capitaliZ/Se

Should be clearer? Yes. I’d suggest a definitions of TERMs, perhaps as an Appendix that details these specific requirements.
