From 0ff3b72b319642f1a80bcf2153e1b06b53dd6e56 Mon Sep 17 00:00:00 2001
From: Alan Zimmerman <alan.zimm@gmail.com>
Date: Fri, 15 Jan 2016 11:14:35 +0200
Subject: Update to match wip/T11430 in GHC

---
 haddock-api/src/Haddock/Backends/Xhtml/Decl.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
index a7a0a2d6..cb6b8cf2 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
@@ -164,7 +164,7 @@ ppFixities fs qual = foldr1 (+++) (map ppFix uniq_fs) +++ rightEdge
       _:[] -> const noHtml -- Don't display names for fixities on single names
       _    -> concatHtml . intersperse (stringToHtml ", ") . map (ppDocName qual Infix False)
 
-    uniq_fs = [ (n, the p, the d') | (n, Fixity p d) <- fs
+    uniq_fs = [ (n, the p, the d') | (n, Fixity _ p d) <- fs
                                    , let d' = ppDir d
                                    , then group by Down (p,d') using groupWith ]
 
-- 
cgit v1.2.3


From 695cb7fecc511e51ceded125dbba276a89a4d86b Mon Sep 17 00:00:00 2001
From: Eric Seidel <gridaphobe@gmail.com>
Date: Mon, 11 Jan 2016 14:57:57 -0800
Subject: deal with un-wiring of IP class

(cherry picked from commit 17388b0f0029d969d79353be7737eb01c7b8dc5f)
---
 haddock-api/src/Haddock/Convert.hs | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index 38271a04..b6dd06e9 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -34,8 +34,8 @@ import TyCon
 import Type
 import TyCoRep
 import TysPrim ( alphaTyVars )
-import TysWiredIn ( listTyConName, ipTyCon )
-import PrelNames ( hasKey, eqTyConKey )
+import TysWiredIn ( listTyConName )
+import PrelNames ( hasKey, eqTyConKey, ipClassKey )
 import Unique ( getUnique )
 import Util ( filterByList, filterOut )
 import Var
@@ -372,7 +372,7 @@ synifyType _ (TyConApp tc tys)
   | getName tc == listTyConName, [ty] <- tys =
      noLoc $ HsListTy (synifyType WithinType ty)
   -- ditto for implicit parameter tycons
-  | tc == ipTyCon
+  | tc `hasKey` ipClassKey
   , [name, ty] <- tys
   , Just x <- isStrLitTy name
   = noLoc $ HsIParamTy (HsIPName x) (synifyType WithinType ty)
-- 
cgit v1.2.3


From af205d20bf3502b41e4fd34b1c991d5014388004 Mon Sep 17 00:00:00 2001
From: RyanGlScott <ryan.gl.scott@gmail.com>
Date: Sun, 17 Jan 2016 01:04:04 -0500
Subject: Render */# instead of TYPE 'Lifted/TYPE 'Unlifted (fixes #473)

---
 haddock-api/src/Haddock/Convert.hs | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs
index b6dd06e9..02e4356a 100644
--- a/haddock-api/src/Haddock/Convert.hs
+++ b/haddock-api/src/Haddock/Convert.hs
@@ -1,3 +1,4 @@
+
 {-# LANGUAGE CPP, PatternGuards #-}
 -----------------------------------------------------------------------------
 -- |
@@ -33,9 +34,10 @@ import TcType ( tcSplitSigmaTy )
 import TyCon
 import Type
 import TyCoRep
-import TysPrim ( alphaTyVars )
-import TysWiredIn ( listTyConName )
-import PrelNames ( hasKey, eqTyConKey, ipClassKey )
+import TysPrim ( alphaTyVars, unliftedTypeKindTyConName )
+import TysWiredIn ( listTyConName, starKindTyConName )
+import PrelNames ( hasKey, eqTyConKey, ipClassKey
+                 , tYPETyConKey, liftedDataConKey, unliftedDataConKey )
 import Unique ( getUnique )
 import Util ( filterByList, filterOut )
 import Var
@@ -360,6 +362,15 @@ synifySigWcType s ty = mkEmptyImplicitBndrs (mkEmptyWildCardBndrs (synifyType s
 synifyType :: SynifyTypeState -> Type -> LHsType Name
 synifyType _ (TyVarTy tv) = noLoc $ HsTyVar $ noLoc (getName tv)
 synifyType _ (TyConApp tc tys)
+  -- Use */# instead of TYPE 'Lifted/TYPE 'Unlifted (#473)
+  | tc `hasKey` tYPETyConKey
+  , [TyConApp lev []] <- tys
+  , lev `hasKey` liftedDataConKey
+  = noLoc (HsTyVar (noLoc starKindTyConName))
+  | tc `hasKey` tYPETyConKey
+  , [TyConApp lev []] <- tys
+  , lev `hasKey` unliftedDataConKey
+  = noLoc (HsTyVar (noLoc unliftedTypeKindTyConName))
   -- Use non-prefix tuple syntax where possible, because it looks nicer.
   | Just sort <- tyConTuple_maybe tc
   , tyConArity tc == length tys
-- 
cgit v1.2.3