aboutsummaryrefslogtreecommitdiff
path: root/html-test/src
diff options
context:
space:
mode:
authornand <git@nand.wakku.to>2014-02-11 11:52:48 +0100
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-02-11 15:53:50 +0000
commitbc5756d062bbc5cad5d4fa60798435ed020c518e (patch)
tree27735d5534d623d74cd9feef8c2306538f3e9e44 /html-test/src
parente0718f203f2448ba2029e70d14aed075860b7fac (diff)
Improve display of poly-kinded type operators
This now displays them as (==) k a b c ... to mirror GHC's behavior, instead of the old (k == a) b c ... which was just wrong. Signed-off-by: Mateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>
Diffstat (limited to 'html-test/src')
-rw-r--r--html-test/src/TypeFamilies.hs14
1 files changed, 12 insertions, 2 deletions
diff --git a/html-test/src/TypeFamilies.hs b/html-test/src/TypeFamilies.hs
index 725e76a7..e7cc0458 100644
--- a/html-test/src/TypeFamilies.hs
+++ b/html-test/src/TypeFamilies.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeFamilies, UndecidableInstances #-}
+{-# LANGUAGE TypeFamilies, UndecidableInstances, PolyKinds, TypeOperators, DataKinds, MultiParamTypeClasses #-}
-- | Doc for: module TypeFamilies
module TypeFamilies where
@@ -21,7 +21,7 @@ instance Test X
instance Test Y
-- | Doc for: type family Foo a
-type family Foo a
+type family Foo a :: k
-- | Doc for: type instance Foo X = Y
type instance Foo X = Y
@@ -66,3 +66,13 @@ instance Assoc Y where
type family Bar b where
Bar X = X
Bar y = Y
+
+type family (<>) (a :: k) (b :: k) :: k
+
+type instance X <> a = X
+type instance Y <> a = a
+
+type instance XXX <> XX = 'X
+
+class (><) (a :: k) (b :: k)
+instance XX >< XXX