[m-rev.] Another compiler bug

Zoltan Somogyi zoltan.somogyi at runbox.com
Mon Aug 7 21:52:06 AEST 2023


On 2023-08-07 13:47 +02:00 CEST, "Volker Wysk" <post at volker-wysk.de> wrote:
> The compiler says:
> 
> desktop ~/src/fis/test $ mmc --make inst
> ** Error making `Mercury/int3s/inst.int3'.
> inst.m:001: Error: module must start with a `:- module' declaration.
> 
> 
> When I rename the module to "inst1", then it works.
> 
> Maybe it's something stupid, but then the error message is bad.

"inst" is an operator. The original module declaration
is sort-of similar to writing a function named "if" in C or Java.

We could provide an error message specifically for such situations,
but such situations are so rare that it is not worthwhile to do so,
either in mmc or in gcc.

Zoltan.


More information about the reviews mailing list