From 6b35adfb811d9e41e5bfa1c11963e441740c2836 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Sat, 15 Feb 2014 08:41:40 +0100 Subject: Add test case for inter-module type/data family instances These should show up in every place where the class is visible, and indeed they do right now. Signed-off-by: Mateusz Kowalczyk --- html-test/ref/TypeFamilies.html | 28 ++++++++++++++++ html-test/ref/TypeFamilies2.html | 72 ++++++++++++++++++++++++++++++++++++++++ html-test/src/TypeFamilies.hs | 8 +++++ html-test/src/TypeFamilies2.hs | 5 ++- 4 files changed, 112 insertions(+), 1 deletion(-) (limited to 'html-test') diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html index 65845102..53a8b9d3 100644 --- a/html-test/ref/TypeFamilies.html +++ b/html-test/ref/TypeFamilies.html @@ -233,6 +233,22 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; > type Foo X = Y

External instance

datadata Bar Y data
data Bar X = BarX Y 
type 
type Foo X = Y

External instance

data family Bar a

Instances

data Bar X = BarX Y 
data Bar Y 
XX = 'X class (><) (a :: k) (b :: k) instance XX >< XXX + +-- | External instance + +type instance TF.Foo X = Y + +data instance TF.Bar Y diff --git a/html-test/src/TypeFamilies2.hs b/html-test/src/TypeFamilies2.hs index 718e11dc..093f77c2 100644 --- a/html-test/src/TypeFamilies2.hs +++ b/html-test/src/TypeFamilies2.hs @@ -3,10 +3,13 @@ -- in type instances. The expected behaviour is -- that we get the instance, Y is not linked and -- Haddock shows a linking warning. -module TypeFamilies2 (X, Foo) where +module TypeFamilies2 (X, Foo, Bar) where data X data Y type family Foo a type instance Foo X = Y + +data family Bar a +data instance Bar X = BarX Y -- cgit v1.2.3