-improve :: (Class -> [Instance]) -- Gives instances for given class
- -> [(PredType,SDoc)] -- Current constraints; doc says where they come from
- -> [(Equation,SDoc)] -- Derived equalities that must also hold
- -- (NB the above INVARIANT for type Equation)
- -- The SDoc explains why the equation holds (for error messages)
+type Pred_Loc = (PredType, SDoc) -- SDoc says where the Pred comes from
+
+improve :: (Class -> [Instance]) -- Gives instances for given class
+ -> [Pred_Loc] -- Current constraints;
+ -> [(Equation,Pred_Loc,Pred_Loc)] -- Derived equalities that must also hold
+ -- (NB the above INVARIANT for type Equation)
+ -- The Pred_Locs explain which two predicates were
+ -- combined (for error messages)