From 8d260690b53f2fb6b54ba78bd13d1400d9ebd395 Mon Sep 17 00:00:00 2001 From: Richard Eisenberg Date: Sat, 7 Nov 2020 22:42:07 -0500 Subject: Avoid GHC#18932. --- haddock-api/src/Haddock/Convert.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'haddock-api') diff --git a/haddock-api/src/Haddock/Convert.hs b/haddock-api/src/Haddock/Convert.hs index 2a711e5c..5f9940fc 100644 --- a/haddock-api/src/Haddock/Convert.hs +++ b/haddock-api/src/Haddock/Convert.hs @@ -93,10 +93,11 @@ tyThingToLHsDecl prr t = case t of extractFamilyDecl _ = Left "tyThingToLHsDecl: impossible associated tycon" + cvt :: HsTyVarBndr flag (GhcPass p) -> HsType (GhcPass p) + -- Without this signature, we trigger GHC#18932 cvt (UserTyVar _ _ n) = HsTyVar noExtField NotPromoted n cvt (KindedTyVar _ _ (L name_loc n) kind) = HsKindSig noExtField (L name_loc (HsTyVar noExtField NotPromoted (L name_loc n))) kind - cvt (XTyVarBndr nec) = noExtCon nec -- | Convert a LHsTyVarBndr to an equivalent LHsType. hsLTyVarBndrToType :: LHsTyVarBndr flag (GhcPass p) -> LHsType (GhcPass p) -- cgit v1.2.3