aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Convert.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/Convert.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/Convert.hs')
-rw-r--r--src/Haddock/Convert.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Haddock/Convert.hs b/src/Haddock/Convert.hs
index 3670473d..1245b2b9 100644
--- a/src/Haddock/Convert.hs
+++ b/src/Haddock/Convert.hs
@@ -380,13 +380,14 @@ synifyInstHead (_, preds, cls, types) =
where (ks,ts) = break (not . isKind) types
-- Convert a family instance, this could be a type family or data family
-synifyFamInst :: FamInst -> InstHead Name
-synifyFamInst fi =
+synifyFamInst :: FamInst -> Bool -> InstHead Name
+synifyFamInst fi opaque =
( fi_fam fi
, map (unLoc . synifyType WithinType) ks
, map (unLoc . synifyType WithinType) ts
, case fi_flavor fi of
- SynFamilyInst -> TypeInst . unLoc . synifyType WithinType $ fi_rhs fi
+ SynFamilyInst | opaque -> TypeInst Nothing
+ SynFamilyInst -> TypeInst . Just . unLoc . synifyType WithinType $ fi_rhs fi
DataFamilyInst c -> DataInst $ synifyTyCon (Just $ famInstAxiom fi) c
)
where (ks,ts) = break (not . isKind) $ fi_tys fi