@@ -148,6 +148,11 @@ pprintDocs ist (InterfaceDoc n doc meths params constraints implementations sub_
148148 else line <> renderDocstring (renderDocTerm (pprintDelab ist) (normaliseAll (tt_ctxt ist) [])) doc)
149149 <> line <$>
150150 nest 4 (text "Parameters:" <$> prettyParameters)
151+
152+ <> (if null constraints
153+ then empty
154+ else line <$> nest 4 (text "Constraints:" <$> prettyConstraints))
155+
151156 <> line <$>
152157 nest 4 (text "Methods:" <$>
153158 vsep (map (pprintFDWithTotality ist False) meths))
@@ -234,17 +239,13 @@ pprintDocs ist (InterfaceDoc n doc meths params constraints implementations sub_
234239 isSubInterface (PPi _ _ _ _ pt) = isSubInterface pt
235240 isSubInterface _ = False
236241
237− prettyConstraints separateLine =
238− let separator = if separateLine then line else empty
239− in case constraints of
240− [] -> empty
241− [pt] -> pprintPTerm ppo params' [] infixes pt <+> text "=>" <> separator
242− _ -> parens (cat (punctuate (comma <> space) (map (pprintPTerm ppo params' [] infixes) constraints))) <+> text "=>" <> separator
242+ prettyConstraints =
243+ cat (punctuate (comma <> space) (map (pprintPTerm ppo params' [] infixes) constraints))
243244
244245 prettyParameters =
245246 if any (isJust . snd) params
246− then prettyConstraints True <> vsep (map (\(nm,md) -> prettyName True False params' nm <+> maybe empty (showDoc ist) md) params)
247− else prettyConstraints False <+> hsep (punctuate comma (map (prettyName True False params' . fst) params))
247+ then vsep (map (\(nm,md) -> prettyName True False params' nm <+> maybe empty (showDoc ist) md) params)
248+ else hsep (punctuate comma (map (prettyName True False params' . fst) params))
248249
249250pprintDocs ist (RecordDoc n doc ctor projs params)
250251 = nest 4 (text "Record" <+> prettyName True (ppopt_impl ppo) [] n <>