[m-dev.] diff: bug fix for type specialization

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 17 16:12:49 AEST 1999


On 17-Sep-1999, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> Estimated hours taken: 1
> 
> compiler/make_hlds.m:
> 	Don't use explicit type qualification for the arguments
> 	of procedures introduced for type specialization because
> 	explicit type qualification doesn't work with type inference -
> 	it appears that the specified types are not kept in sync with
> 	the predicate's tvarset after the first pass of type-checking.

That change looks fine, but it might be a good idea to keep an
XXX comment there so that if/when we fix that problem, we can change
this code to use explicit type qualification again.

> 	Debugging and testing a fix for explicit type qualification is
> 	difficult because there isn't any syntax for it yet.

You could apply the patch below and then use the syntax

	Var `'TYPE_QUAL_OP'` Type

Index: make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.300
diff -u -u -r1.300 make_hlds.m
--- make_hlds.m	1999/07/14 14:56:11	1.300
+++ make_hlds.m	1999/09/17 06:09:49
@@ -5359,7 +5359,6 @@
 	{ RHS = term__functor(F, Args, FunctorContext) },
 	(
 		% Handle explicit type qualification.
-		{ semidet_fail },
 		{ F = term__atom("TYPE_QUAL_OP") },
 		{ Args = [RVal, DeclType0] }
 	->
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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