diff: fix a typeclass bug
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jul 29 16:13:24 AEST 1998
DJ has already given this an "over-the-shoulder" review ;-)
Estimated hours taken: 1
compiler/check_typeclass.m:
Fix a bug: when generating the goal for the introduced predicate
(function) for each function method in an instance declarations,
it was not setting the goal_info correctly.
Index: compiler/check_typeclass.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/check_typeclass.m,v
retrieving revision 1.12
diff -u -r1.12 check_typeclass.m
--- check_typeclass.m 1998/07/08 20:55:47 1.12
+++ check_typeclass.m 1998/07/29 05:51:53
@@ -472,7 +472,10 @@
create_atomic_unification(ReturnVar,
functor(cons(InstancePredName, PredArity),
RealHeadVars),
- Context, explicit, [], IntroducedGoal)
+ Context, explicit, [], IntroducedGoal0),
+ % set the goal_info
+ IntroducedGoal0 = IntroducedGoalExpr - _,
+ IntroducedGoal = IntroducedGoalExpr - GoalInfo
),
IntroducedClause = clause(InstanceProcIds, IntroducedGoal, Context),
ClausesInfo = clauses_info(VarSet, VarTypes, VarTypes, HeadVars,
--
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.
More information about the developers
mailing list