[m-users.] determinism declaration of main as "erroneous"

Volker Wysk post at volker-wysk.de
Tue Oct 29 18:15:34 AEDT 2019


Hi

This program compiles:

:- module test_format.
:- interface.
:- import_module io.
:- pred main(io::di, io::uo) is det.

:- implementation.
:- import_module exception, list, string.

main(!IO) :-
    throw("bla").


But I get this warning message:

test_format.m:004: In `main'(di, uo):
test_format.m:004:   warning: determinism declaration could be tighter.
test_format.m:004:   Declared `det', inferred `erroneous'.


When I replace "det" by "erroneous", I get:

test_format.m:004: Error: `main'/2 must be `det' or `cc_multi'.
** Error making `Mercury/cs/test_format.c'.


So the warning message is wrong. A little bug.


Bye
Volker



More information about the users mailing list