From 48f45676f7c6c79b249b51dde9a6791393860676 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 15 Mar 2014 15:15:44 +0100 Subject: Hide minimal definition for only-method classes Previously this was not covered by the All xs check since here it is not actually an All, rather a single Var n. This also adds the previously missing html-test/src/Minimal.hs. --- src/Haddock/Backends/Xhtml/Decl.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs index 39276441..67185bff 100644 --- a/src/Haddock/Backends/Xhtml/Decl.hs +++ b/src/Haddock/Backends/Xhtml/Decl.hs @@ -474,11 +474,16 @@ ppClassDecl summary links instances fixities loc d subdocs -- type signature? minimalBit = case [ s | L _ (MinimalSig s) <- lsigs ] of - -- Miminal complete definition = every method + -- Miminal complete definition = every shown method And xs : _ | sort [getName n | Var (L _ n) <- xs] == sort [getName n | L _ (TypeSig ns _) <- lsigs, L _ n <- ns] -> noHtml + -- Minimal complete definition = the only shown method + Var (L _ n) : _ | [getName n] == + [getName n' | L _ (TypeSig ns _) <- lsigs, L _ n' <- ns] + -> noHtml + -- Minimal complete definition = nothing And [] : _ -> subMinimal $ toHtml "Nothing" -- cgit v1.2.3