aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/AttachInstances.hs
diff options
context:
space:
mode:
authorNiklas Haas <git@nand.wakku.to>2014-03-12 10:31:31 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-03-13 19:18:06 +0000
commit3606ad5fdb8b9c2c3f9a62de1d26702ad41f9a10 (patch)
tree56e35153453b6469ef34cd356b966293ee81d1ff /src/Haddock/Interface/AttachInstances.hs
parent8f71c6f26eb5b36e5a1ca253b8c8ffdca75849d8 (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/Interface/AttachInstances.hs')
-rw-r--r--src/Haddock/Interface/AttachInstances.hs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Haddock/Interface/AttachInstances.hs b/src/Haddock/Interface/AttachInstances.hs
index 60ae4661..a0bac8fc 100644
--- a/src/Haddock/Interface/AttachInstances.hs
+++ b/src/Haddock/Interface/AttachInstances.hs
@@ -70,13 +70,12 @@ attachToExportItem expInfo iface ifaceMap instIfaceMap export =
expItemInstances =
case mb_info of
Just (_, _, cls_instances, fam_instances) ->
- let fam_insts = [ (synifyFamInst i, n)
+ let fam_insts = [ (synifyFamInst i opaque, n)
| i <- sortBy (comparing instFam) fam_instances
, let n = instLookup instDocMap (getName i) iface ifaceMap instIfaceMap
, not $ isNameHidden expInfo (fi_fam i)
, not $ any (isTypeHidden expInfo) (fi_tys i)
- -- Should we check for hidden RHS as well?
- -- Ideally, in that case the RHS should simply not show up
+ , let opaque = isTypeHidden expInfo (fi_rhs i)
]
cls_insts = [ (synifyInstHead i, instLookup instDocMap n iface ifaceMap instIfaceMap)
| let is = [ (instanceHead' i, getName i) | i <- cls_instances ]