[m-rev.] for review: --warn-unused-types
Zoltan Somogyi
zoltan.somogyi at runbox.com
Sun Feb 15 16:24:54 AEDT 2026
On Sun, 15 Feb 2026 15:49:17 +1100, Julien Fischer <jfischer at opturion.com> wrote:
> > That module tests mostly a grab-bag of proposed-then-quickly-forgotten
> > additions to the Mercury language, such as undiscriminated union types.
> > I don't think it is useful anymore (if it *ever* was useful), but it doesn't
> > hurt much either.
>
> I think it still has some small value: what happens
> if you put a fragment of Prolog into the Mercury compiler?
Most of the constructs it tests the diagnostics for are not in Prolog.
Some are, but I think those are also tested by other test cases.
> Aside: the start of the errors for that file are:
>
> bigtest.m:005: Error: module must start with a `:- module' declaration.
> bigtest.m:005: Error: module `bigtest' should start with either an
> bigtest.m:005: `:- interface' declaration or an `:- implementation'
> bigtest.m:005: declaration.
> bigtest.m:005: The following assumes that the missing declaration is an
> bigtest.m:005: `:- implementation' declaration.
>
> If I were being picky, there's ambiguity as to what declaration the
> module should
> start with: is it module (first message) or interface / implementation
> (second message)?
I just committed the attached diff to fix that ambiguity. My, that is a *lot*
of test cases for missing section markers.
Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.intimp
Type: application/octet-stream
Size: 838 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260215/d6681b75/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.intimp
Type: application/octet-stream
Size: 13978 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20260215/d6681b75/attachment-0003.obj>
More information about the reviews
mailing list