[m-rev.] undeclared abstract type?

Peter Wang wangp at students.csse.unimelb.edu.au
Fri Nov 17 20:26:26 AEDT 2006


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?

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.

Peter

Index: det_report.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/det_report.m,v
retrieving revision 1.132
diff -u -r1.132 det_report.m
--- det_report.m        6 Nov 2006 07:55:07 -0000       1.132
+++ det_report.m        17 Nov 2006 08:49:48 -0000
@@ -52,6 +52,8 @@
     ;       generic_call_goal(generic_call)
     ;       negated_goal.

+:- type switch_context.
+
 %-----------------------------------------------------------------------------%

     % Check all the determinism declarations in this module.



--------------------------------------------------------------------------
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