aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-19 05:11:34 +0000
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-19 05:11:34 +0000
commit91e2c21cfdaca7913dbfec17bdd7712c0c1ed732 (patch)
treeb8a93a633cedc924042300334748750e27b945cb /src/Haddock/Backends/Xhtml.hs
parent6b35adfb811d9e41e5bfa1c11963e441740c2836 (diff)
Use a bespoke data type to indicate fixity
This deals with what I imagine was an ancient TODO and makes it much clearer what the argument actually does rather than having the user chase down the comment.
Diffstat (limited to 'src/Haddock/Backends/Xhtml.hs')
-rw-r--r--src/Haddock/Backends/Xhtml.hs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/Haddock/Backends/Xhtml.hs b/src/Haddock/Backends/Xhtml.hs
index 77ff35b2..35b82a2c 100644
--- a/src/Haddock/Backends/Xhtml.hs
+++ b/src/Haddock/Backends/Xhtml.hs
@@ -587,18 +587,18 @@ processForMiniSynopsis mdl unicode qual (ExportDecl (L _loc decl0) _doc _ _insts
(ClassDecl {}) -> [keyword "class" <+> b]
_ -> []
SigD (TypeSig lnames (L _ _)) ->
- map (ppNameMini False mdl . nameOccName . getName . unLoc) lnames
+ map (ppNameMini Prefix mdl . nameOccName . getName . unLoc) lnames
_ -> []
processForMiniSynopsis _ _ qual (ExportGroup lvl _id txt) =
[groupTag lvl << docToHtml qual txt]
processForMiniSynopsis _ _ _ _ = []
-ppNameMini :: Bool -> Module -> OccName -> Html
-ppNameMini is_infix mdl nm =
+ppNameMini :: Notation -> Module -> OccName -> Html
+ppNameMini notation mdl nm =
anchor ! [ href (moduleNameUrl mdl nm)
, target mainFrameName ]
- << ppBinder' is_infix nm
+ << ppBinder' notation nm
ppTyClBinderWithVarsMini :: Module -> TyClDecl DocName -> Html
@@ -654,10 +654,10 @@ processExport summary _ _ qual (ExportGroup lev id0 doc)
processExport summary links unicode qual (ExportDecl decl doc subdocs insts)
= processDecl summary $ ppDecl summary links decl doc insts subdocs unicode qual
processExport summary _ _ qual (ExportNoDecl y [])
- = processDeclOneLiner summary $ ppDocName qual (Just False) y
+ = processDeclOneLiner summary $ ppDocName qual Prefix y
processExport summary _ _ qual (ExportNoDecl y subs)
= processDeclOneLiner summary $
- ppDocName qual (Just False) y +++ parenList (map (ppDocName qual (Just False)) subs)
+ ppDocName qual Prefix y +++ parenList (map (ppDocName qual Prefix) subs)
processExport summary _ _ qual (ExportDoc doc)
= nothingIf summary $ docSection_ qual doc
processExport summary _ _ _ (ExportModule mdl)