[m-rev.] undeclared abstract type?

Julien Fischer juliensf at csse.unimelb.edu.au
Sat Nov 18 01:23:17 AEDT 2006


On Fri, 17 Nov 2006, Peter Wang wrote:

> Hi,
>
> det_report.m exports
>
> :- pred det_diagnose_conj(list(hlds_goal)::in, determinism::in,
>    list(switch_context)::in, det_info::in, list(error_msg)::out) is
>    det.
>
> but `switch_context' isn't declared in the interface section.  It's only
> defined in the implementation section.  Is this supposed to be allowed?

No.  (I suspect the reason that it "works" is that the only call to 
det_diagnose_conj outside of the det_report module, det_analysis.m:710,
passes an empty list as the third argument.)

> An exception is thrown when compiling det_analysis.m with
> --smart-recompilation, as it can't find `switch_context' in any .int file.
> Exporting switch_context as an abstract type fixes it.

I suggest putting an XXX comment above the abstract type declaration;
at some point we'll need to sort out exactly what's going on there.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list