aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-15 15:15:44 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-03-15 18:20:24 +0000
commit48f45676f7c6c79b249b51dde9a6791393860676 (patch)
tree3dd1b9c92fac4f817b0c9158d5ee008098198b6a /src/Haddock
parent76bafc9e873ea0a75c2ad40b74310cecad89e245 (diff)
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.
Diffstat (limited to 'src/Haddock')
-rw-r--r--src/Haddock/Backends/Xhtml/Decl.hs7
1 files changed, 6 insertions, 1 deletions
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"