From 9c35fb711009ace5815bd0941466cfc0c8e4ec75 Mon Sep 17 00:00:00 2001 From: David Waern Date: Wed, 21 Jul 2010 13:44:27 +0000 Subject: Remove more trailing whitespace --- src/Haddock/Backends/Xhtml/DocMarkup.hs | 6 +++--- src/Haddock/Backends/Xhtml/Layout.hs | 20 ++++++++++---------- src/Haddock/Backends/Xhtml/Names.hs | 4 ++-- src/Haddock/Backends/Xhtml/Utils.hs | 24 ++++++++++++------------ 4 files changed, 27 insertions(+), 27 deletions(-) (limited to 'src/Haddock/Backends/Xhtml') diff --git a/src/Haddock/Backends/Xhtml/DocMarkup.hs b/src/Haddock/Backends/Xhtml/DocMarkup.hs index cb1377dc..28f8c782 100644 --- a/src/Haddock/Backends/Xhtml/DocMarkup.hs +++ b/src/Haddock/Backends/Xhtml/DocMarkup.hs @@ -14,7 +14,7 @@ module Haddock.Backends.Xhtml.DocMarkup ( docToHtml, rdrDocToHtml, origDocToHtml, - + docElement, docSection, maybeDocSection, ) where @@ -112,7 +112,7 @@ cleanup = markup fmtUnParagraphLists unParagraph doc = doc fmtUnParagraphLists :: DocMarkup a (Doc a) - fmtUnParagraphLists = idMarkup { + fmtUnParagraphLists = idMarkup { markupUnorderedList = DocUnorderedList . map unParagraph, markupOrderedList = DocOrderedList . map unParagraph - } + } diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index 321d2f66..eb9fc28d 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -12,18 +12,18 @@ ----------------------------------------------------------------------------- module Haddock.Backends.Xhtml.Layout ( miniBody, - + divPackageHeader, divContent, divModuleHeader, divFooter, divTableOfContents, divDescription, divSynposis, divInterface, divIndex, divAlphabet, divModuleList, sectionName, - + shortDeclList, shortSubDecls, - + divTopDecl, - + SubDecl, subArguments, subAssociatedTypes, @@ -31,7 +31,7 @@ module Haddock.Backends.Xhtml.Layout ( subFields, subInstances, subMethods, - + topDeclElem, declElem, ) where @@ -101,7 +101,7 @@ divSubDecls cssClass captionName = maybe noHtml wrap {- if we ever decide to style sub-declarations with dl lists, this code does it - + subDlist :: [SubDecl] -> Maybe Html subDlist [] = Nothing subDlist decls = Just $ dlist << map subEntry decls @@ -110,7 +110,7 @@ subDlist decls = Just $ dlist << map subEntry decls dterm ! [theclass "src"] << decl +++ docElement ddef << (fmap docToHtml mdoc `with` subs) - + Nothing `with` [] = spaceHtml ma `with` bs = ma +++ bs -} @@ -159,7 +159,7 @@ declElem = paragraph ! [theclass "src"] -- a box for top level documented names -- it adds a source and wiki link at the right hand side of the box topDeclElem :: LinksInfo -> SrcSpan -> DocName -> Html -> Html -topDeclElem ((_,_,maybe_source_url), (_,_,maybe_wiki_url)) loc name html = +topDeclElem ((_,_,maybe_source_url), (_,_,maybe_wiki_url)) loc name html = declElem << (html +++ srcLink +++ wikiLink) where srcLink = case maybe_source_url of @@ -174,9 +174,9 @@ topDeclElem ((_,_,maybe_source_url), (_,_,maybe_wiki_url)) loc name html = Just url -> let url' = spliceURL (Just fname) (Just mdl) (Just n) (Just loc) url in anchor ! [href url', theclass "link"] << "Comments" - + -- For source links, we want to point to the original module, - -- because only that will have the source. + -- because only that will have the source. -- TODO: do something about type instances. They will point to -- the module defining the type family, which is wrong. origMod = nameModule n diff --git a/src/Haddock/Backends/Xhtml/Names.hs b/src/Haddock/Backends/Xhtml/Names.hs index 5b61f63f..0c7df9a8 100644 --- a/src/Haddock/Backends/Xhtml/Names.hs +++ b/src/Haddock/Backends/Xhtml/Names.hs @@ -38,7 +38,7 @@ ppLDocName :: Located DocName -> Html ppLDocName (L _ d) = ppDocName d ppDocName :: DocName -> Html -ppDocName (Documented name mdl) = +ppDocName (Documented name mdl) = linkIdOcc mdl (Just occName) << ppOccName occName where occName = nameOccName name ppDocName (Undocumented name) = toHtml (getOccString name) @@ -67,7 +67,7 @@ linkId mdl mbName = linkIdOcc mdl (fmap nameOccName mbName) linkIdOcc :: Module -> Maybe OccName -> Html -> Html linkIdOcc mdl mbName = anchor ! [href url] - where + where url = case mbName of Nothing -> moduleUrl mdl Just name -> moduleNameUrl mdl name diff --git a/src/Haddock/Backends/Xhtml/Utils.hs b/src/Haddock/Backends/Xhtml/Utils.hs index 30e0cc09..78754138 100644 --- a/src/Haddock/Backends/Xhtml/Utils.hs +++ b/src/Haddock/Backends/Xhtml/Utils.hs @@ -12,20 +12,20 @@ ----------------------------------------------------------------------------- module Haddock.Backends.Xhtml.Utils ( renderToString, - + namedAnchor, linkedAnchor, spliceURL, - + (<+>), char, nonEmpty, keyword, punctuate, - + braces, brackets, pabrackets, parens, parenList, ubxParenList, arrow, comma, dcolon, dot, darrow, equals, forallSymbol, quote, - + hsep, - + collapsebutton, collapseId, - + cssFiles, styleSheet, stylePickers, styleMenu ) where @@ -42,7 +42,7 @@ import Module ( Module ) import Name ( getOccString, nameOccName, isValOcc ) -spliceURL :: Maybe FilePath -> Maybe Module -> Maybe GHC.Name -> +spliceURL :: Maybe FilePath -> Maybe Module -> Maybe GHC.Name -> Maybe SrcSpan -> String -> String spliceURL maybe_file maybe_mod maybe_name maybe_loc url = run url where @@ -50,7 +50,7 @@ spliceURL maybe_file maybe_mod maybe_name maybe_loc url = run url mdl = case maybe_mod of Nothing -> "" Just m -> moduleString m - + (name, kind) = case maybe_name of Nothing -> ("","") @@ -162,7 +162,7 @@ namedAnchor n = anchor ! [XHtml.name n] linkedAnchor :: String -> Html -> Html linkedAnchor n = anchor ! [href ('#':n)] - + -- -- A section of HTML which is collapsible via a +/- button. -- @@ -172,7 +172,7 @@ linkedAnchor n = anchor ! [href ('#':n)] -- use cookies from JavaScript to have a more persistent state. collapsebutton :: String -> Html -collapsebutton id_ = +collapsebutton id_ = image ! [ src minusFile, theclass "coll", onclick ("toggle(this,'" ++ id_ ++ "')"), alt "show/hide" ] -- A quote is a valid part of a Haskell identifier, but it would interfere with @@ -202,7 +202,7 @@ styleSheet = toHtml $ zipWith mkLink cssThemes rels stylePickers :: [Html] stylePickers = map mkPicker cssThemes where - mkPicker (aTitle, aFile) = + mkPicker (aTitle, aFile) = let js = "setActiveStyleSheet('" ++ aFile ++ "'); return false;" in anchor ! [href "#", onclick js] << aTitle @@ -213,4 +213,4 @@ styleMenu = thediv ! [identifier "style-menu-holder"] << [ ] where js = "styleMenu(); return false;" - \ No newline at end of file + -- cgit v1.2.3