@@ -123,11 +123,14 @@ pprintDocs ist (ClassDoc n doc meths params instances superclasses)
123 updateRef nm (PRef fc _) = PRef fc nm
123 updateRef nm (PRef fc _) = PRef fc nm
124 updateRef _ pt = pt
124 updateRef _ pt = pt
126− hasConstraint (PPi (Constraint _ _) _ _ _) = True
126+ isSubclass (PPi (Constraint _ _) _ _ (PApp _ (PRef _ nm) ((PExp _ _ _ tm):_))) = nm == n && not (isApp tm)
127− hasConstraint (PPi _ _ _ pt) = hasConstraint pt
127+ isSubclass (PPi _ _ _ pt) = isSubclass pt
128− hasConstraint _ = False
128+ isSubclass _ = False
130+ isApp (PApp _ _ _) = True
130− (subclasses, instances') = partition hasConstraint instances
133+ (subclasses, instances') = partition isSubclass instances
132 prettyParameters = if any (isJust . snd) params
135 prettyParameters = if any (isJust . snd) params
133 then vsep (map (\(nm,md) -> prettyName False params' nm <+> maybe empty showDoc md) params)
136 then vsep (map (\(nm,md) -> prettyName False params' nm <+> maybe empty showDoc md) params)