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 --- CHANGES | 2 + html-test/ref/TypeFamilies.html | 292 ++++++++++++++++++++++++++++--------- html-test/src/TypeFamilies.hs | 14 +- src/Haddock/Backends/LaTeX.hs | 22 +-- src/Haddock/Backends/Xhtml.hs | 2 +- src/Haddock/Backends/Xhtml/Decl.hs | 30 ++-- src/Haddock/Convert.hs | 10 +- src/Haddock/Interface/Rename.hs | 5 +- src/Haddock/Types.hs | 6 +- 9 files changed, 280 insertions(+), 103 deletions(-) diff --git a/CHANGES b/CHANGES index 63c3e687..f548d03a 100644 --- a/CHANGES +++ b/CHANGES @@ -29,6 +29,8 @@ Changes in version 2.14.0 * Print type/data family instances + * Fix display of poly-kinded type operators + Changes in version 2.13.2 * Handle HsExplicitListTy in renamer (#213) diff --git a/html-test/ref/TypeFamilies.html b/html-test/ref/TypeFamilies.html index bfafc3d0..65845102 100644 --- a/html-test/ref/TypeFamilies.html +++ b/html-test/ref/TypeFamilies.html @@ -90,7 +90,7 @@ window.onload = function () {pageLoad();setSynopsis("mini_TypeFamilies.html");}; >type family Foo a a :: k
  • data family Bar b
  • type family a <> b :: k
  • class a >< b
  • Assoc * XTest * Xdata AssocD X = AssocX type AssocT X = Foo(><) X XX XXX data AssocD * X = AssocX type AssocT * X = Foo * X type Foo * X = YDoc for: type instance Foo X = Y

    type (<>) * X a = X type (<>) X XXX XX = X 
    Assoc * YTest * Ydata AssocD Y = AssocY type AssocT Y = Bat Y datadata AssocD * Y = AssocY type AssocT * Y = Bat Y type Foo * Y = XDoc for: type instance Foo Y = X

    type (<>) * Y a = a Test * YTest * Xtype family Foo a

    a :: k

    Doc for: type family Foo a

    type Foo * Y = Xtype Foo * X = YAssoc * YAssoc * X

    type family a <> b :: k

    Instances

    type (<>) * Y a = a 
    type (<>) * X a = X 
    type (<>) X XXX XX = X 

    class a >< b

    Instances