diff options
author | romes <rodrigo.m.mesquita@gmail.com> | 2022-04-25 19:52:22 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-05-31 12:43:22 +0100 |
commit | 89afef9daeb6da6624d42d32813d86c1f9b9f0c3 (patch) | |
tree | 2f3e086632ee3438c9ec516786ef6e9768512cf8 /haddock-api/src/Haddock/Interface/Rename.hs | |
parent | 4dd5c93bded622a6e2e011dc7e2c8976454b53c5 (diff) |
TTG: Match new GHC AST
Diffstat (limited to 'haddock-api/src/Haddock/Interface/Rename.hs')
-rw-r--r-- | haddock-api/src/Haddock/Interface/Rename.hs | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/haddock-api/src/Haddock/Interface/Rename.hs b/haddock-api/src/Haddock/Interface/Rename.hs index cbc7e58f..d2f11733 100644 --- a/haddock-api/src/Haddock/Interface/Rename.hs +++ b/haddock-api/src/Haddock/Interface/Rename.hs @@ -314,7 +314,8 @@ renameType t = case t of XHsType a -> pure (XHsType a) HsExplicitListTy _ a b -> HsExplicitListTy noAnn a <$> mapM renameLType b HsExplicitTupleTy _ b -> HsExplicitTupleTy noAnn <$> mapM renameLType b - HsSpliceTy _ s -> renameHsSpliceTy s + HsSpliceTy (HsUntypedSpliceTop _ st) _ -> renameType st + HsSpliceTy (HsUntypedSpliceNested _) _ -> error "renameType: not an top level type splice" HsWildCardTy _ -> pure (HsWildCardTy noAnn) @@ -324,17 +325,6 @@ renameSigType (HsSig { sig_bndrs = bndrs, sig_body = body }) = do body' <- renameLType body pure $ HsSig { sig_ext = noExtField, sig_bndrs = bndrs', sig_body = body' } --- | Rename splices, but _only_ those that turn out to be for types. --- I think this is actually safe for our possible inputs: --- --- * the input is from after GHC's renamer, so should have an 'HsSpliced' --- * the input is typechecked, and only 'HsSplicedTy' should get through that --- -renameHsSpliceTy :: HsSplice GhcRn -> RnM (HsType DocNameI) -renameHsSpliceTy (HsSpliced _ _ (HsSplicedTy t)) = renameType t -renameHsSpliceTy (HsSpliced _ _ _) = error "renameHsSpliceTy: not an HsSplicedTy" -renameHsSpliceTy _ = error "renameHsSpliceTy: not an HsSpliced" - renameLHsQTyVars :: LHsQTyVars GhcRn -> RnM (LHsQTyVars DocNameI) renameLHsQTyVars (HsQTvs { hsq_explicit = tvs }) = do { tvs' <- mapM renameLTyVarBndr tvs |