on master help sign in
Correct filtering for subclasses in pprintDocs for multiparameter subclasses
commit49d28a91a6cd8631f9a6c74b638bb62c58ea708c authorPaul Koerbitz <paul.koerbitz@theppro.com> dateSun 11 May 2014, 14:55 (12 years ago) parent671719e
1 file changed+1−4
src/Idris/Docs.hs+1−4
src/Idris/Docs.hs+1−4
@@ -123,13 +123,10 @@ pprintDocs ist (ClassDoc n doc meths params instances superclasses)
123123 updateRef nm (PRef fc _) = PRef fc nm
124124 updateRef _ pt = pt
125125
126− isSubclass (PPi (Constraint _ _) _ _ (PApp _ (PRef _ nm) ((PExp _ _ _ tm):_))) = nm == n && not (isApp tm)
126+ isSubclass (PPi (Constraint _ _) _ (PApp _ _ args) (PApp _ (PRef _ nm) args')) = nm == n && map getTm args == map getTm args'
127127 isSubclass (PPi _ _ _ pt) = isSubclass pt
128128 isSubclass _ = False
129129
130− isApp (PApp _ _ _) = True
131− isApp _ = False
132−
133130 (subclasses, instances') = partition isSubclass instances
134131
135132 prettyParameters = if any (isJust . snd) params