[m-dev.] trivial diff: use check_typeclass__introduced_pred_name_prefix

David Glen JEFFERY dgj at cs.mu.OZ.AU
Tue Apr 27 17:58:40 AEST 1999


--------------------------------------------------------------------

Estimated hours taken: 0.1

compiler/hlds_out.m:
	Use check_typeclass__introduced_pred_name_prefix rather than
	a hard-coded string. (Also change the layout of a couple of 
	if-then-elses seeing that calling this functions makes a line wrap).

--------------------------------------------------------------------
Index: hlds_out.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/hlds_out.m,v
retrieving revision 1.217
diff -u -t -r1.217 hlds_out.m
--- hlds_out.m	1999/03/22 08:07:14	1.217
+++ hlds_out.m	1999/04/26 07:00:32
@@ -207,7 +207,7 @@
 
 :- import_module mercury_to_mercury, globals, options, purity, special_pred.
 :- import_module llds_out, prog_out, prog_util, (inst), instmap, trace.
-:- import_module term_io, varset, termination, term_errors.
+:- import_module term_io, varset, termination, term_errors, check_typeclass.
 
 :- import_module int, string, set, std_util, assoc_list, multi_map.
 :- import_module require, getopt.
@@ -280,7 +280,9 @@
         { pred_info_name(PredInfo, Name) },
         { pred_info_arity(PredInfo, Arity) },
         { pred_info_get_is_pred_or_func(PredInfo, PredOrFunc) },
-        ( { special_pred_name_arity(Kind, _, Name, Arity) } ->
+        ( 
+                { special_pred_name_arity(Kind, _, Name, Arity) } 
+        ->
                 { special_pred_description(Kind, Descr) },
                 io__write_string(Descr),
                 io__write_string(" for type "),
@@ -291,7 +293,10 @@
                 ;
                         { error("special_pred_get_type failed!") }
                 )
-        ; { string__prefix(Name, "Introduced_pred_for_") } ->
+        ; 
+                { string__prefix(Name,
+                        check_typeclass__introduced_pred_name_prefix) } 
+        ->
                 io__write_string("type class method implementation")
         ;
                 hlds_out__write_pred_or_func(PredOrFunc),




--------------------------------------------------------------------
--------------------------------------------------------------------


dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Homer, is this how you pictured
PhD student,                    |         married life?
Dept. of Comp. Sci. & Soft. Eng.|  Homer: Yup, pretty much... except we
The University of Melbourne     |         drove around in a van solving
Australia                       |         mysteries.
--------------------------------------------------------------------------
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