aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-04-20 11:36:10 -0400
committerGitHub <noreply@github.com>2020-04-20 11:36:10 -0400
commitda4e2bd788b6231494d6ac56a8e88bcfa4be51f6 (patch)
treeda9825b15419755e67c2eda5b6f929fc5b6b56d5 /haddock-api
parent75ea1b31fce54bf2b0c1bf8edad4419f48e6036c (diff)
parentff5c04e3142cebfb51873e2c6164703d3b7f74cc (diff)
Merge pull request #1165 from obsidiansystems/wip/ttg-con-pat
Trees that Grow refactor (GHC !2553)
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/GhcUtils.hs3
-rw-r--r--haddock-api/src/Haddock/Types.hs2
2 files changed, 4 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs
index 4d41571d..f681c1dc 100644
--- a/haddock-api/src/Haddock/GhcUtils.hs
+++ b/haddock-api/src/Haddock/GhcUtils.hs
@@ -41,6 +41,7 @@ import GHC.Types.Var.Env ( TyVarEnv, extendVarEnv, elemVarEnv, emptyVarEnv )
import GHC.Core.TyCo.Rep ( Type(..) )
import GHC.Core.Type ( isRuntimeRepVar )
import GHC.Builtin.Types( liftedRepDataConTyCon )
+import GHC.Hs.Utils (CollectPass(..))
import StringBuffer ( StringBuffer )
import qualified StringBuffer as S
@@ -55,7 +56,7 @@ moduleString = moduleNameString . moduleName
isNameSym :: Name -> Bool
isNameSym = isSymOcc . nameOccName
-getMainDeclBinder :: HsDecl (GhcPass p) -> [IdP (GhcPass p)]
+getMainDeclBinder :: (CollectPass (GhcPass p)) => HsDecl (GhcPass p) -> [IdP (GhcPass p)]
getMainDeclBinder (TyClD _ d) = [tcdName d]
getMainDeclBinder (ValD _ d) =
case collectHsBindBinders d of
diff --git a/haddock-api/src/Haddock/Types.hs b/haddock-api/src/Haddock/Types.hs
index 1a0b2c79..f12a6bce 100644
--- a/haddock-api/src/Haddock/Types.hs
+++ b/haddock-api/src/Haddock/Types.hs
@@ -299,6 +299,8 @@ data DocNameI
type instance IdP DocNameI = DocName
+instance CollectPass DocNameI where
+ collectXXPat _ ext = noExtCon ext
instance NamedThing DocName where
getName (Documented name _) = name