Re: [m-users.] Free and Ground in the same error line?
"Sean Charles (emacstheviking)" <[email protected]> Sat, 28 Oct 2023 11:49:13 +0100
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
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