[m-users.] uncaught exception when module name does not match end_module
Matthias Guedemann
matthias.guedemann at googlemail.com
Fri Jan 16 07:53:21 AEDT 2015
Hi,
when compiling the following program (differing names test/test0) using
`mmc --make`
,----
| :- module test.
| :- interface.
| :- import_module io.
| :- pred main(io::di, io::uo) is det.
| :- implementation.
| main(!IO) :-
| nl(!IO).
| :- end_module test0.
`----
Mercury[1] reports the following error:
,----
| Making Mercury/cs/test.c
| Uncaught Mercury exception:
| Software Error: parse_tree.equiv_type: predicate `parse_tree.equiv_type.replace_in_item_list'/13: Unexpected: module start or end
| Stack dump not available in this grade.
| ** Error making `Mercury/cs/test.c'.
`----
This seems to be a bug; there should better be an error message
reporting the non-matching names of the module declaration and the end
of the module.
Best regards,
Matthias
Footnotes:
[1] Mercury Compiler, version 14.01.1, configured for x86_64-unknown-linux-gnu
More information about the users
mailing list