[commit: haddock] wip/T12105: Matching changes for #12105 (5030924)

git at git.haskell.org git at git.haskell.org
Mon Nov 20 21:02:56 UTC 2017


Repository : ssh://git@git.haskell.org/haddock

On branch  : wip/T12105
Link       : http://git.haskell.org/haddock.git/commitdiff/50309244c7554b189e5243153784445139f52529

>---------------------------------------------------------------

commit 50309244c7554b189e5243153784445139f52529
Author: Alan Zimmerman <alan.zimm at gmail.com>
Date:   Wed May 25 23:52:02 2016 +0200

    Matching changes for #12105


>---------------------------------------------------------------

50309244c7554b189e5243153784445139f52529
 haddock-api/src/Haddock/Backends/Hoogle.hs | 4 +++-
 haddock-api/src/Haddock/Types.hs           | 6 +++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index 9a15c7b..1c3dea7 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -1,3 +1,4 @@
+{-# LANGUAGE FlexibleContexts #-}
 -----------------------------------------------------------------------------
 -- |
 -- Module      :  Haddock.Backends.Hoogle
@@ -84,7 +85,8 @@ dropHsDocTy = f
         f (HsDocTy a _) = f $ unL a
         f x = x
 
-outHsType :: OutputableBndr a => DynFlags -> HsType a -> String
+outHsType :: (OutputableBndr a, OutputableBndr (NameOrRdrName a))
+          => DynFlags -> HsType a -> String
 outHsType dflags = out dflags . dropHsDocTy
 
 
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index eacf447..1a7a0b6 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -1,4 +1,7 @@
 {-# LANGUAGE DeriveDataTypeable, DeriveFunctor, DeriveFoldable, DeriveTraversable, StandaloneDeriving, TypeFamilies, RecordWildCards #-}
+{-# LANGUAGE FlexibleContexts #-}
+{-# LANGUAGE UndecidableInstances #-} -- Note [Pass sensitive types]
+                                      -- in module GHC.PlaceHolder
 {-# OPTIONS_GHC -fno-warn-orphans #-}
 -----------------------------------------------------------------------------
 -- |
@@ -341,7 +344,8 @@ data InstType name
   | TypeInst  (Maybe (HsType name)) -- ^ Body (right-hand side)
   | DataInst (TyClDecl name)        -- ^ Data constructors
 
-instance OutputableBndr a => Outputable (InstType a) where
+instance (OutputableBndr a, OutputableBndr (NameOrRdrName a))
+         => Outputable (InstType a) where
   ppr (ClassInst { .. }) = text "ClassInst"
       <+> ppr clsiCtx
       <+> ppr clsiTyVars



More information about the ghc-commits mailing list