diff options
author | Niklas Haas <git@nand.wakku.to> | 2014-03-12 10:31:31 +0100 |
---|---|---|
committer | Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk> | 2014-03-13 19:18:06 +0000 |
commit | 3606ad5fdb8b9c2c3f9a62de1d26702ad41f9a10 (patch) | |
tree | 56e35153453b6469ef34cd356b966293ee81d1ff /src/Haddock/Backends | |
parent | 8f71c6f26eb5b36e5a1ca253b8c8ffdca75849d8 (diff) |
Hide RHS of TFs with non-exported right hand sides
Not sure what to do about data families yet, since technically it would
not make a lot of sense to display constructors that cannot be used by
the user.
Diffstat (limited to 'src/Haddock/Backends')
-rw-r--r-- | src/Haddock/Backends/LaTeX.hs | 3 | ||||
-rw-r--r-- | src/Haddock/Backends/Xhtml/Decl.hs | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/Haddock/Backends/LaTeX.hs b/src/Haddock/Backends/LaTeX.hs index 6535b24e..44b3fc35 100644 --- a/src/Haddock/Backends/LaTeX.hs +++ b/src/Haddock/Backends/LaTeX.hs @@ -563,7 +563,8 @@ ppInstDecl unicode instHead = keyword "instance" <+> ppInstHead unicode instHead ppInstHead :: Bool -> InstHead DocName -> LaTeX ppInstHead unicode (n, ks, ts, ClassInst ctx) = ppContextNoLocs ctx unicode <+> ppAppNameTypes n ks ts unicode ppInstHead unicode (n, ks, ts, TypeInst rhs) = keyword "type" - <+> ppAppNameTypes n ks ts unicode <+> equals <+> ppType unicode rhs + <+> ppAppNameTypes n ks ts unicode + <+> maybe empty (\t -> equals <+> ppType unicode t) rhs ppInstHead _unicode (_n, _ks, _ts, DataInst _dd) = error "data instances not supported by --latex yet" diff --git a/src/Haddock/Backends/Xhtml/Decl.hs b/src/Haddock/Backends/Xhtml/Decl.hs index c0efa5d0..c1b9032e 100644 --- a/src/Haddock/Backends/Xhtml/Decl.hs +++ b/src/Haddock/Backends/Xhtml/Decl.hs @@ -488,7 +488,7 @@ ppInstances instances baseName unicode qual <+> ppAppNameTypes n ks ts unicode qual instHead (n, ks, ts, TypeInst rhs) = keyword "type" <+> ppAppNameTypes n ks ts unicode qual - <+> equals <+> ppType unicode qual rhs + <+> maybe noHtml (\t -> equals <+> ppType unicode qual t) rhs instHead (n, ks, ts, DataInst dd) = keyword "data" <+> ppAppNameTypes n ks ts unicode qual <+> ppShortDataDecl False True dd unicode qual |