[m-dev.] for review: add error messages for dl__mercury_sym
Ina Cheng
inch at students.cs.mu.oz.au
Thu Feb 1 13:10:42 AEDT 2001
Hi,
Fergus added extra error messages for dl__mercury_sym in my workspace.
Ina
<inch at students.cs.mu.oz.au>
==================================================================
Estimated hours taken: 0.5
browser/dl.m:
Add extra error messages for dl__mercury_sym.
cvs diff: Diffing .
Index: dl.m
===================================================================
RCS file: /home/mercury1/repository/mercury/browser/dl.m,v
retrieving revision 1.6
diff -u -r1.6 dl.m
--- dl.m 2001/01/11 05:41:53 1.6
+++ dl.m 2001/02/01 01:54:01
@@ -258,7 +258,8 @@
mercury_proc::in, mercury_proc::out) is det.
check_proc_spec_matches_result_type(_Result, Value, Proc0, Proc) :-
Proc0 = mercury_proc(IsPredOrFunc, _Module, _Name, ProcArity, _Mode),
- type_ctor_name_and_arity(type_ctor(type_of(Value)),
+ ResultType = type_of(Value),
+ type_ctor_name_and_arity(type_ctor(ResultType),
TypeModule, TypeName, TypeArity),
( TypeName = "func" ->
TypeProcArity = TypeArity - 1
@@ -271,7 +272,9 @@
)
->
error(
- "dl__mercury_sym: result type is not a higher-order type")
+ "dl__mercury_sym: result type (`" ++
+ type_name(ResultType) ++
+ "') is not a higher-order type")
;
IsPredOrFunc = predicate, TypeName \= "pred"
->
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list