aboutsummaryrefslogtreecommitdiff
path: root/html-test/src/TypeFamilies2.hs
diff options
context:
space:
mode:
authornand <git@nand.wakku.to>2014-02-04 22:13:27 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-11 15:48:30 +0000
commite0718f203f2448ba2029e70d14aed075860b7fac (patch)
treebe0d1a8d69efe1c7114b0740a660dff28939ad69 /html-test/src/TypeFamilies2.hs
parent860d6504530a163e7483960ca8837eb596e05634 (diff)
Add support for type/data families
This adds support for type/data families with their respective instances, as well as closed type families and associated type/data families. Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Diffstat (limited to 'html-test/src/TypeFamilies2.hs')
-rw-r--r--html-test/src/TypeFamilies2.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/html-test/src/TypeFamilies2.hs b/html-test/src/TypeFamilies2.hs
new file mode 100644
index 00000000..718e11dc
--- /dev/null
+++ b/html-test/src/TypeFamilies2.hs
@@ -0,0 +1,12 @@
+{-# LANGUAGE TypeFamilies #-}
+-- This tests what happens if we have unexported types
+-- 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
+
+data X
+data Y
+
+type family Foo a
+type instance Foo X = Y