diff options
author | Richard Eisenberg <rae@richarde.dev> | 2020-11-07 22:42:07 -0500 |
---|---|---|
committer | Richard Eisenberg <rae@richarde.dev> | 2020-11-25 23:18:35 -0500 |
commit | 8d260690b53f2fb6b54ba78bd13d1400d9ebd395 (patch) | |
tree | 521fdaad56a11cd7bfee3e207da8a5cfc8da59bc | |
parent | 2d06af2fc535dacc4bac45d45e8eb95a7620caac (diff) |
Avoid GHC#18932.
-rw-r--r-- | haddock-api/src/Haddock/Convert.hs | 3 |
1 files changed, 2 insertions, 1 deletions
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) |