diff options
author | Niklas Haas <git@nand.wakku.to> | 2014-03-13 08:53:41 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-13 19:18:10 +0000 |
commit | eaf0a0b51f452398f3c64882a334f90b920df794 (patch) | |
tree | e007ca9b2a8748ab9aeb135e813f91b673884f2f /src/Haddock/Backends/Xhtml/Layout.hs | |
parent | 64175d6ade5717b7e0c7fa0a122d16cae6779031 (diff) |
Display minimal complete definitions for type classes
This corresponds to the new {-# MINIMAL #-} pragma present in GHC 7.8+.
I also cleaned up some of the places in which ExportDecl is used to make
adding fields easier in the future.
Lots of test cases have been updated since they now render with
minimality information.
Diffstat (limited to 'src/Haddock/Backends/Xhtml/Layout.hs')
-rw-r--r-- | src/Haddock/Backends/Xhtml/Layout.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Haddock/Backends/Xhtml/Layout.hs b/src/Haddock/Backends/Xhtml/Layout.hs index 6784fb30..d3d94424 100644 --- a/src/Haddock/Backends/Xhtml/Layout.hs +++ b/src/Haddock/Backends/Xhtml/Layout.hs @@ -33,6 +33,7 @@ module Haddock.Backends.Xhtml.Layout ( subFields, subInstances, subMethods, + subMinimal, topDeclElem, declElem, ) where @@ -182,6 +183,9 @@ subInstances qual nm = maybe noHtml wrap . instTable subMethods :: [Html] -> Html subMethods = divSubDecls "methods" "Methods" . subBlock +subMinimal :: Html -> Html +subMinimal = divSubDecls "minimal" "Minimal complete definition" . Just . declElem + -- a box for displaying code declElem :: Html -> Html |