diff options
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml/Utils.hs')
-rw-r--r-- | haddock-api/src/Haddock/Backends/Xhtml/Utils.hs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs index 1d49807d..a8b4a4ec 100644 --- a/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs +++ b/haddock-api/src/Haddock/Backends/Xhtml/Utils.hs @@ -20,7 +20,7 @@ module Haddock.Backends.Xhtml.Utils ( (<+>), (<=>), char, keyword, punctuate, - braces, brackets, pabrackets, parens, parenList, ubxParenList, + braces, brackets, pabrackets, parens, parenList, ubxParenList, ubxSumList, arrow, comma, dcolon, dot, darrow, equals, forallSymbol, quote, promoQuote, hsep, vcat, @@ -75,8 +75,7 @@ spliceURL' maybe_file maybe_mod maybe_name maybe_loc = run case span_ of RealSrcSpan span__ -> show $ srcSpanStartLine span__ - UnhelpfulSpan _ -> - error "spliceURL UnhelpfulSpan" + UnhelpfulSpan _ -> "" run "" = "" run ('%':'M':rest) = mdl ++ run rest @@ -178,6 +177,10 @@ ubxParenList :: [Html] -> Html ubxParenList = ubxparens . hsep . punctuate comma +ubxSumList :: [Html] -> Html +ubxSumList = ubxparens . hsep . punctuate (toHtml " | ") + + ubxparens :: Html -> Html ubxparens h = toHtml "(#" +++ h +++ toHtml "#)" |