- (addpr (foldr add2 (0,0) (map (count_bind.unLoc) (bagToList inst_meths))), ss, is)
+ case foldr add2 (0, 0) (map (countATDecl . unLoc) ats) of
+ (tyDecl, dtDecl) ->
+ (addpr (foldr add2 (0,0)
+ (map (count_bind.unLoc) (bagToList inst_meths))),
+ ss, is, tyDecl, dtDecl)
+ where
+ countATDecl (TyData {}) = (0, 1)
+ countATDecl (TySynonym {}) = (1, 0)
+ countATDecl d = pprPanic "countATDecl: Unhandled decl"
+ (ppr d)