Re: [m-users.] Free and Ground in the same error line?

Volker Wysk <[email protected]> Sat, 28 Oct 2023 12:53:13 +0200
Newsgroups gmane.comp.lang.mercury.general
Message-ID <[email protected]>
I have the impression that the compiler often gives complicated error
messages for stupid errors... 

Am Samstag, dem 28.10.2023 um 11:49 +0100 schrieb Sean Charles
(emacstheviking):
> Thank you Zoltan, that helps my brain dealing with my mistake a little more  :D
> 
> 
> > On 28 Oct 2023, at 11:42, Zoltan Somogyi <[email protected]> wrote:
> > 
> > 
> > On 2023-10-28 21:36 +11:00 AEDT, "Volker Wysk" <[email protected]> wrote:
> > > You don't have an "else" for your second "if".
> > 
> > That is clearly the source of the error in Sean's program, but there is
> > another issue here. The Mercury reference manual lists if-then-else
> > as a DCG goal type, but does NOT list if-then without else as a DCG goal type.
> > On the other hand, the DCG goal parser in the compiler does accept
> > else-less if-then DCG goals. This seems to be either an oversight in the parser,
> > or, more likely, a hangover from the ancient past. Either way, it seems to be
> > the cause of the lack of a direct error message for situations like this.
> > 
> > Zoltan.
> 

_______________________________________________
users mailing list
[email protected]
https://lists.mercurylang.org/listinfo/users