aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorShayan-Najd <sh.najd@gmail.com>2018-11-23 01:38:49 +0100
committerShayan-Najd <sh.najd@gmail.com>2018-11-23 01:38:49 +0100
commit6414b46e1ac8b63cad20d662311788a80e3b29bb (patch)
treebec426cfd5da585a9a9e0bdfd0800f149a792f79 /haddock-api/src/Haddock/Backends/Xhtml.hs
parent0b379984f7898ab0656f71f05fb0163a6a2ddb2c (diff)
[TTG: Handling Source Locations] Foundation and Pat
Trac Issues #15495 This patch removes the ping-pong style from HsPat (only, for now), using the plan laid out at https://ghc.haskell.org/trac/ghc/wiki/ImplementingTreesThatGrow/HandlingSourceLocations (solution A). - the class `HasSrcSpan`, and its functions (e.g., `cL` and `dL`), are introduced - some instances of `HasSrcSpan` are introduced - some constructors `L` are replaced with `cL` - some patterns `L` are replaced with `dL->L` view pattern - some type annotation are necessarily updated (e.g., `Pat p` --> `Pat (GhcPass p)`)
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index db29c7cf..da8f7a53 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -397,11 +397,11 @@ ppJsonIndex odir maybe_source_url maybe_wiki_url unicode pkg qual_opt ifaces = d
where
names = exportName item ++ exportSubs item
- exportSubs :: ExportItem name -> [IdP name]
+ exportSubs :: ExportItem DocNameI -> [IdP DocNameI]
exportSubs ExportDecl { expItemSubDocs } = map fst expItemSubDocs
exportSubs _ = []
- exportName :: ExportItem name -> [IdP name]
+ exportName :: ExportItem DocNameI -> [IdP DocNameI]
exportName ExportDecl { expItemDecl } = getMainDeclBinder (unLoc expItemDecl)
exportName ExportNoDecl { expItemName } = [expItemName]
exportName _ = []