From 82ab2c09c19641e0ea89965c9af291043798486d Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 15 Mar 2014 15:17:18 +0100 Subject: Fix issue #281 This is a regression from the data family instances change. Data instances are now distinguished from regular lists by usage of the new class "inst", and the style has been updated to only apply to those. I've also updated the appropriate test case to test this a bit better, including GADT instances with GADT-style records. --- src/Haddock/Backends/Xhtml/Layout.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Haddock/Backends/Xhtml/Layout.hs') diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index d3d94424..e84a57b3 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -104,8 +104,12 @@ shortDeclList :: [Html] -> Html shortDeclList items = ulist << map (li ! [theclass "src short"] <<) items -shortSubDecls :: [Html] -> Html -shortSubDecls items = ulist ! [theclass "subs"] << map (li <<) items +shortSubDecls :: Bool -> [Html] -> Html +shortSubDecls inst items = ulist ! [theclass c] << map (i <<) items + where i | inst = li ! [theclass "inst"] + | otherwise = li + c | inst = "inst" + | otherwise = "subs" divTopDecl :: Html -> Html -- cgit v1.2.3