Make some evidence uses reachable by toHie
Resolves #23540, #23120 This adds spans to certain expressions in the typechecker and renamer, and lets 'toHie' make use of those spans. Therefore the relevant evidence uses for the following syntax will now show up under the expected nodes in 'HieAst's: - Overloaded literals ('IsString', 'Num', 'Fractional') - Natural patterns and N+k patterns ('Eq', 'Ord', and instances from the overloaded literals being matched on) - Arithmetic sequences ('Enum') - Monadic bind statements ('Monad') - Monadic body statements ('Monad', 'Alternative') - ApplicativeDo ('Applicative', 'Functor') - Overloaded lists ('IsList') Also see Note [Source locations for implicit function calls] In the process of handling overloaded lists I added an extra 'SrcSpan' field to 'VAExpansion' - this allows us to more accurately reconstruct the locations from the renamer in 'rebuildHsApps'. This also happens to fix #23120. See the additions to Note [Looking through HsExpanded]
Showing
- compiler/GHC/Hs/Utils.hs 13 additions, 9 deletionscompiler/GHC/Hs/Utils.hs
- compiler/GHC/Iface/Ext/Ast.hs 83 additions, 7 deletionscompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Rename/Expr.hs 8 additions, 3 deletionscompiler/GHC/Rename/Expr.hs
- compiler/GHC/Rename/Pat.hs 2 additions, 1 deletioncompiler/GHC/Rename/Pat.hs
- compiler/GHC/Rename/Utils.hs 6 additions, 1 deletioncompiler/GHC/Rename/Utils.hs
- compiler/GHC/Tc/Gen/App.hs 1 addition, 1 deletioncompiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Head.hs 27 additions, 7 deletionscompiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Utils/Instantiate.hs 2 additions, 2 deletionscompiler/GHC/Tc/Utils/Instantiate.hs
- ghc/GHCi/UI/Info.hs 5 additions, 0 deletionsghc/GHCi/UI/Info.hs
Loading
Please register or sign in to comment