Skip to content
Discussions/App Development/Parser error on module headerForum ↗

Parser error on module header

App Development4 posts261 views1 likesLast activity Dec 2021
BE
Bels3OP
Oct 2021

I am experiencing the following problem.

error

The error is " error: parse error on input ‘accounts’". How should I resolve this. Any assistance will be highly appreciated.

CO
cocreature
Oct 2021

Hi @Bels3,

The issue is that module names need to start with an uppercase letter. So try

module Account where

Note that your file name also needs to match the module name as described in the docs so you might also have to adjust that.

BE
Bels3
Oct 2021

your assistance is highly appreciated. I will reach for any technical assistance

QU
quidagis
Dec 2021

I have seen this issue quite a few times, it bit myself in the beginning also and IIRC, you stated the same thing. Perhaps ‘A module MUST start with a Capital letter’ should be clearly stated in the Documentation, early on.

I just checked the Cheat Sheet and there are 5 references to the term ‘module’, and it displays an example:

Every Daml file starts with a module header like this:

daml 1.2
module Foo where

That could be amended to:

Every Daml file starts with a module header, and the
module name must be Capitalized, like this:

daml 1.2
module Foo where

My $0.02

← Back to Discussions