Module, Template and File Naming Relationships
I am writing a Bash-based Daml Smart Contract Generator 'cos I am weird like that
but also to allow me a better understanding of the overall process.
A few times, I’ve had reported errors while executing filename.daml using ‘daml’ from the command line, of misnaming conflicts. This is doubly more obvious now that I have my Vim setup for Daml syntax highlighting and language server support as per the excellent Vim tutorial by @Luciano.
Having looked through the documentation for both ‘module’ & ‘template’, I have not found a canonical reference to the naming policy on Modules (Internal/External to templates), Templates and filenames.
Is there such a reference?
In the process of testing the Daml smart contract generator, the Vim LSP highlighted part of the answer for me:
“Module names should always match file names …”
The link you found should be the canonical reference. Basically replace, . in the module name by / in the file name and add .daml as the extension.