HieAst: add module name #24493
The main purpose of this is to tuck the module name `xxx` in `module xxx where` into the hieAst. It should fix #24493. The following have been done: 1. Renamed and update the `tcg_doc_hdr :: Maybe (LHsDoc GhcRn)` to `tcg_hdr_info :: (Maybe (LHsDoc GhcRn), Maybe (XRec GhcRn ModuleName))` To store the located module name information. 2. update the `RenamedSource` and `RenamedStuff` with extra `Maybe (XRec GhcRn ModuleName)` located module name information. 3. add test `testsuite/tests/hiefile/should_compile/T24493.hs` to ensure the module name is added and update several relevent tests. 4. accompanied submodule haddoc test update MR in ghc/haddock!53
Showing
- compiler/GHC.hs 1 addition, 1 deletioncompiler/GHC.hs
- compiler/GHC/HsToCore/Docs.hs 2 additions, 2 deletionscompiler/GHC/HsToCore/Docs.hs
- compiler/GHC/Iface/Ext/Ast.hs 6 additions, 3 deletionscompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Tc/Module.hs 6 additions, 5 deletionscompiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs 3 additions, 1 deletioncompiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Backpack.hs 2 additions, 2 deletionscompiler/GHC/Tc/Utils/Backpack.hs
- compiler/GHC/Tc/Utils/Monad.hs 1 addition, 1 deletioncompiler/GHC/Tc/Utils/Monad.hs
- testsuite/tests/hiefile/should_compile/T24493.hs 3 additions, 0 deletionstestsuite/tests/hiefile/should_compile/T24493.hs
- testsuite/tests/hiefile/should_compile/T24493.stderr 33 additions, 0 deletionstestsuite/tests/hiefile/should_compile/T24493.stderr
- testsuite/tests/hiefile/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/hiefile/should_compile/all.T
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr 12 additions, 2 deletionstestsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/T14189.stderr 11 additions, 4 deletionstestsuite/tests/parser/should_compile/T14189.stderr
- utils/haddock 1 addition, 1 deletionutils/haddock
Loading
Please register or sign in to comment