diff options
author | alexbiehl <alex.biehl@gmail.com> | 2018-02-19 05:56:54 +0100 |
---|---|---|
committer | alexbiehl <alex.biehl@gmail.com> | 2018-02-19 05:57:02 +0100 |
commit | 6d62c5b79d0f3ce975c087b5176ee53d62122d86 (patch) | |
tree | 68c0bd5418a03a49f9a927231a05482edfc162f7 /haddock-api/src/Haddock/Backends | |
parent | 5141e4b76af8462e49abdf48e44bb9cddb183383 (diff) |
Teach the HTML backend how to render methods with multiple names
Diffstat (limited to 'haddock-api/src/Haddock/Backends')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs index 3b85f96c..6e733373 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs @@ -516,14 +516,14 @@ ppClassDecl summary links instances fixities loc d subdocs doc = lookupAnySubdoc (unL $ fdLName $ unL at) subdocs subfixs = [ f | f@(n',_) <- fixities, n == n' ] ] - methodBit = subMethods [ ppFunSig summary links loc doc names (hsSigType typ) + methodBit = subMethods [ ppFunSig summary links loc doc [name] (hsSigType typ) subfixs splice unicode qual | L _ (ClassOpSig _ lnames typ) <- lsigs - , let doc = lookupAnySubdoc (head names) subdocs - subfixs = [ f | n <- names - , f@(n',_) <- fixities - , n == n' ] - names = map unLoc lnames ] + , name <- map unLoc lnames + , let doc = lookupAnySubdoc name subdocs + subfixs = [ f | f@(n',_) <- fixities + , name == n' ] + ] -- N.B. taking just the first name is ok. Signatures with multiple names -- are expanded so that each name gets its own signature. |