@@ -74,8 +74,9 @@ pprintDocs :: IState -> Docs -> Doc OutputAnnotation
74pprintDocs ist (FunDoc d) = pprintFD ist d
74pprintDocs ist (FunDoc d) = pprintFD ist d
75pprintDocs ist (DataDoc t args)
75pprintDocs ist (DataDoc t args)
76 = text "Data type" <+> pprintFD ist t <$>
76 = text "Data type" <+> pprintFD ist t <$>
77+ if null args then text "No constructors."
77− nest 4 (text "Constructors:" <> line <>
78+ else nest 4 (text "Constructors:" <> line <>
78− vsep (map (pprintFD ist) args))
79+ vsep (map (pprintFD ist) args))
79pprintDocs ist (ClassDoc n doc meths params instances)
80pprintDocs ist (ClassDoc n doc meths params instances)
80 = nest 4 (text "Type class" <+> prettyName (ppopt_impl ppo) [] n <>
81 = nest 4 (text "Type class" <+> prettyName (ppopt_impl ppo) [] n <>
81 if nullDocstring doc then empty else line <> renderDocstring doc)
82 if nullDocstring doc then empty else line <> renderDocstring doc)