From bc5756d062bbc5cad5d4fa60798435ed020c518e Mon Sep 17 00:00:00 2001 From: nand Date: Tue, 11 Feb 2014 11:52:48 +0100 Subject: 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 --- html-test/src/TypeFamilies.hs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'html-test/src/TypeFamilies.hs') 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 -- cgit v1.2.3