aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2020-03-28 12:28:48 -0400
committerAlec Theriault <alec.theriault@gmail.com>2020-03-28 13:36:25 -0400
commitb33e4bebce0fb98acfc2c1f5efc370e95a061c86 (patch)
tree6ac793be5fdd45b3a99be96c44fedc4964da96d3 /haddock-api/src/Haddock/Backends/Xhtml
parent730a2163245cf7aaf389458113e6fa338eca7865 (diff)
Use `unLoc`/`noLoc` from GHC instead of `unL`/`reL`
* `unL` is already defined by GHC as `unLoc` * `reL` is already defined by GHC as `noLoc` (in a safer way too!) * Condense `setOutputDir` and add a about exporting from GHC Fixes #978
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml/Decl.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index 25669ca7..ef0ba1b6 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -492,7 +492,7 @@ ppShortClassDecl summary links (ClassDecl { tcdCtxt = lctxt, tcdLName = lname, t
+++ shortSubDecls False
(
[ ppAssocType summary links doc at [] splice unicode pkg qual | at <- ats
- , let doc = lookupAnySubdoc (unL $ fdLName $ unL at) subdocs ] ++
+ , let doc = lookupAnySubdoc (unLoc $ fdLName $ unLoc at) subdocs ] ++
-- ToDo: add associated type defaults
@@ -544,7 +544,7 @@ ppClassDecl summary links instances fixities loc d subdocs
<+>
subDefaults (maybeToList defTys)
| at <- ats
- , let name = unL . fdLName $ unL at
+ , let name = unLoc . fdLName $ unLoc at
doc = lookupAnySubdoc name subdocs
subfixs = filter ((== name) . fst) fixities
defTys = (declElem . ppDefaultAssocTy name) <$> lookupDAT name