aboutsummaryrefslogtreecommitdiff
path: root/haddock-api
diff options
context:
space:
mode:
authorSimon Jakobi <simon.jakobi@gmail.com>2018-06-13 23:28:47 +0200
committerSimon Jakobi <simon.jakobi@gmail.com>2018-06-13 23:39:30 +0200
commit083faee1cec2df01d7ab8a4ef2dc0a28c0c120cf (patch)
tree019ec6fb3b6015da43a63f82768eb4f7f645b178 /haddock-api
parent02b2f1d46d0982f19e339051ca13e6cb203840cb (diff)
Complete FixitySig and FamilyDecl pattern matches
Diffstat (limited to 'haddock-api')
-rw-r--r--haddock-api/src/Haddock/Backends/Hoogle.hs1
-rw-r--r--haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs3
2 files changed, 4 insertions, 0 deletions
diff --git a/haddock-api/src/Haddock/Backends/Hoogle.hs b/haddock-api/src/Haddock/Backends/Hoogle.hs
index 6e8148f7..257a8d6d 100644
--- a/haddock-api/src/Haddock/Backends/Hoogle.hs
+++ b/haddock-api/src/Haddock/Backends/Hoogle.hs
@@ -201,6 +201,7 @@ ppFam dflags decl@(FamilyDecl { fdInfo = info })
-- for Hoogle, so pretend it doesn't have any.
ClosedTypeFamily{} -> decl { fdInfo = OpenTypeFamily }
_ -> decl
+ppFam _ XFamilyDecl {} = panic "ppFam"
ppInstance :: DynFlags -> ClsInst -> [String]
ppInstance dflags x =
diff --git a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
index 220a59fe..0ecf7109 100644
--- a/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
+++ b/haddock-api/src/Haddock/Backends/Hyperlinker/Ast.hs
@@ -183,8 +183,11 @@ decls (group, _, _, _) = concatMap ($ group)
fix term = case cast term of
Just ((GHC.FixitySig _ names _) :: GHC.FixitySig GHC.GhcRn)
-> map (\(GHC.L sspan x) -> (sspan, RtkVar x)) names
+ Just ((GHC.XFixitySig {}) :: GHC.FixitySig GHC.GhcRn)
+ -> GHC.panic "haddock:decls"
Nothing -> empty
tyfam (GHC.L _ (GHC.FamilyDecl{..})) = [decl fdLName]
+ tyfam (GHC.L _ (GHC.XFamilyDecl {})) = GHC.panic "haddock:dels"
sig (GHC.L _ (GHC.TypeSig _ names _)) = map decl names
sig (GHC.L _ (GHC.PatSynSig _ names _)) = map decl names
sig (GHC.L _ (GHC.ClassOpSig _ _ names _)) = map decl names