From 3606ad5fdb8b9c2c3f9a62de1d26702ad41f9a10 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Wed, 12 Mar 2014 10:31:31 +0100 Subject: 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. --- src/Haddock/Interface/AttachInstances.hs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/Haddock/Interface/AttachInstances.hs') 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 ] -- cgit v1.2.3