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 /html-test/src/TypeFamilies2.hs | |
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 'html-test/src/TypeFamilies2.hs')
-rw-r--r-- | html-test/src/TypeFamilies2.hs | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/html-test/src/TypeFamilies2.hs b/html-test/src/TypeFamilies2.hs index 34790a51..b66acbfa 100644 --- a/html-test/src/TypeFamilies2.hs +++ b/html-test/src/TypeFamilies2.hs @@ -6,18 +6,34 @@ -- -- The other families and instances that are not exported should not -- show up at all -module TypeFamilies2 (X, Foo, Bar) where +module TypeFamilies2 (W, Foo, Bar) where -data X -data Y +-- | Exported type +data W +-- | Hidden type +data Z + +-- | Exported type family type family Foo a -type instance Foo X = Y -type instance Foo Y = X -- Should be hidden +-- | Should be visible, but with a hidden right hand side +type instance Foo W = Z + +-- | Should be hidden +type instance Foo Z = W + +-- | Exported data family data family Bar a -data instance Bar X = BarX Y +-- | Shown because BarX is still exported despite Z being hidden +data instance Bar W = BarX Z + +-- | Should be completely invisible, including instances type family Invisible a -type instance Invisible X = Y -type instance Invisible Y = X +type instance Invisible W = Z +type instance Invisible Z = W + +data family Invisible2 a +data instance Invisible2 W = Invis Z +data instance Invisible2 Z = Invis' W |