@@ -49,6 +49,7 @@ data Docs' d = FunDoc (FunDoc' d)
4949 | InterfaceDoc Name d -- interface docs
5050 [FunDoc' d] -- method docs
5151 [(Name, Maybe d)] -- parameters and their docstrings
52+ [PTerm] -- parameter constraints
5253 [(Maybe Name, PTerm, (d, [(Name, d)]))] -- implementations: name for named implementations, the constraint term, the docs
5354 [PTerm] -- sub interfaces
5455 [PTerm] -- super interfaces
@@ -140,13 +141,18 @@ pprintDocs ist (DataDoc t args)
140141 if null args then text "No constructors."
141142 else nest 4 (text "Constructors:" <> line <>
142143 vsep (map (pprintFDWithoutTotality ist False) args))
143−pprintDocs ist (InterfaceDoc n doc meths params implementations sub_interfaces super_interfaces ctor)
144+pprintDocs ist (InterfaceDoc n doc meths params constraints implementations sub_interfaces super_interfaces ctor)
144145 = nest 4 (text "Interface" <+> prettyName True (ppopt_impl ppo) [] n <>
145146 if nullDocstring doc
146147 then empty
147148 else line <> renderDocstring (renderDocTerm (pprintDelab ist) (normaliseAll (tt_ctxt ist) [])) doc)
148149 <> line <$>
149150 nest 4 (text "Parameters:" <$> prettyParameters)
151+
152+ <> (if null constraints
153+ then empty
154+ else line <$> nest 4 (text "Constraints:" <$> prettyConstraints))
155+
150156 <> line <$>
151157 nest 4 (text "Methods:" <$>
152158 vsep (map (pprintFDWithTotality ist False) meths))
@@ -233,6 +239,9 @@ pprintDocs ist (InterfaceDoc n doc meths params implementations sub_interfaces s
233239 isSubInterface (PPi _ _ _ _ pt) = isSubInterface pt
234240 isSubInterface _ = False
235241
242+ prettyConstraints =
243+ cat (punctuate (comma <> space) (map (pprintPTerm ppo params' [] infixes) constraints))
244+
236245 prettyParameters =
237246 if any (isJust . snd) params
238247 then vsep (map (\(nm,md) -> prettyName True False params' nm <+> maybe empty (showDoc ist) md) params)
@@ -336,7 +345,7 @@ docInterface n ci
336345 SN _ -> return Nothing
337346 _ -> fmap Just $ docFun ctorN
338347 return $ InterfaceDoc
339− n docstr mdocs params
348+ n docstr mdocs params (interface_constraints ci)
340349 implementations' (map (\(_,tm,_) -> tm) sub_interfaces) super_interfaces
341350 ctorDocs
342351 where