aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-05-23 02:29:05 -0700
committerSimon Jakobi <simon.jakobi@gmail.com>2018-06-13 23:39:30 +0200
commit622c45d56e0ccb11e3b8b0832654cb30c8369ba8 (patch)
tree851b0d37012728950d7331d391d28c4a7bfd0a96 /haddock-api/src
parentd1b26b4846f10fc3e0f84f6898852a6605a3e286 (diff)
Use `ClassOpSig` instead of `TypeSig` for class methods (#835)
* Fix minimal pragma handling Class declarations contain 'ClassOpSig' not 'Typesig'. This should fix #834. * Accept html-test output
Diffstat (limited to 'haddock-api/src')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index d4f6db0e..819c9aa6 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -523,9 +523,9 @@ ppShortClassDecl summary links (ClassDecl { tcdCtxt = lctxt, tcdLName = lname, t
-- ToDo: add associated type defaults
- [ ppFunSig summary links loc doc names (hsSigWcType typ)
+ [ ppFunSig summary links loc doc names (hsSigType typ)
[] splice unicode pkg qual
- | L _ (TypeSig _ lnames typ) <- sigs
+ | L _ (ClassOpSig _ False lnames typ) <- sigs
, let doc = lookupAnySubdoc (head names) subdocs
names = map unLoc lnames ]
-- FIXME: is taking just the first name ok? Is it possible that
@@ -585,12 +585,12 @@ ppClassDecl summary links instances fixities loc d subdocs
minimalBit = case [ s | MinimalSig _ _ (L _ s) <- sigs ] of
-- Miminal complete definition = every shown method
And xs : _ | sort [getName n | L _ (Var (L _ n)) <- xs] ==
- sort [getName n | TypeSig _ ns _ <- sigs, L _ n <- ns]
+ sort [getName n | ClassOpSig _ _ ns _ <- sigs, 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]
+ [getName n' | L _ (ClassOpSig _ _ ns _) <- lsigs, L _ n' <- ns]
-> noHtml
-- Minimal complete definition = nothing