diff options
author | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-01-10 05:37:17 +0000 |
---|---|---|
committer | Austin Seipp <austin@well-typed.com> | 2014-01-12 14:48:35 -0600 |
commit | ef9aa98d6ccbe79888c501f94c9aa6688520c28e (patch) | |
tree | c8b86e469383ebcac5472300608355d410e6942a /src/Haddock/Backends/Hoogle.hs | |
parent | d08865e42e7b03348549b79cdc251f444516bc34 (diff) |
Support for bold.
Conflicts:
src/Haddock/Backends/Hoogle.hs
src/Haddock/Interface/Rename.hs
src/Haddock/Parser.hs
Diffstat (limited to 'src/Haddock/Backends/Hoogle.hs')
-rw-r--r-- | src/Haddock/Backends/Hoogle.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Haddock/Backends/Hoogle.hs b/src/Haddock/Backends/Hoogle.hs index 6afc7939..521b0c90 100644 --- a/src/Haddock/Backends/Hoogle.hs +++ b/src/Haddock/Backends/Hoogle.hs @@ -11,7 +11,7 @@ -- Write out Hoogle compatible documentation -- http://www.haskell.org/hoogle/ ----------------------------------------------------------------------------- -module Haddock.Backends.Hoogle ( +module Haddock.Backends.Hoogle ( ppHoogle ) where @@ -160,7 +160,7 @@ ppData dflags decl@(DataDecl { tcdDataDefn = defn }) subdocs = showData decl{ tcdDataDefn = defn { dd_cons=[],dd_derivs=Nothing }} : concatMap (ppCtor dflags decl subdocs . unL) (dd_cons defn) where - + -- GHC gives out "data Bar =", we want to delete the equals -- also writes data : a b, when we want data (:) a b showData d = unwords $ map f $ if last xs == "=" then init xs else xs @@ -194,7 +194,7 @@ ppCtor dflags dat subdocs con = lookupCon dflags subdocs (con_name con) name = out dflags $ unL $ con_name con resType = case con_res con of - ResTyH98 -> apps $ map (reL . HsTyVar) $ + ResTyH98 -> apps $ map (reL . HsTyVar) $ (tcdName dat) : [hsTyVarName v | L _ v@(UserTyVar _) <- hsQTvBndrs $ tyClDeclTyVars dat] ResTyGADT x -> x @@ -247,6 +247,7 @@ markupTag dflags = Markup { markupModule = box (TagInline "a") . str, markupWarning = box (TagInline "i"), markupEmphasis = box (TagInline "i"), + markupBold = box (TagInline "b"), markupMonospaced = box (TagInline "tt"), markupPic = const $ str " ", markupUnorderedList = box (TagL 'u'), |