Typecheck an overloaded label as a "head"
When implementing Quick Look I'd failed to remember that overloaded labels, like #foo, should be treated as a "head", so that they can be instantiated with Visible Type Application. This patch fixes the problem by moving the typechecking for overloaded labels from GHC.Tc.Gen.Expr to GHC.Tc.Gen.Head. It's also done a bit more elegantly, rather than by constructing a new HsExpr and re-invoking the typechecker. This was all shown up by #19154, which is now fixed.
Showing
- compiler/GHC/Builtin/Names.hs 12 additions, 7 deletionscompiler/GHC/Builtin/Names.hs
- compiler/GHC/Builtin/Types/Prim.hs 15 additions, 9 deletionscompiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Core/Opt/Simplify.hs 27 additions, 14 deletionscompiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Hs/Expr.hs 149 additions, 9 deletionscompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Utils.hs 1 addition, 1 deletioncompiler/GHC/Hs/Utils.hs
- compiler/GHC/HsToCore/Coverage.hs 4 additions, 10 deletionscompiler/GHC/HsToCore/Coverage.hs
- compiler/GHC/HsToCore/Expr.hs 17 additions, 62 deletionscompiler/GHC/HsToCore/Expr.hs
- compiler/GHC/HsToCore/Match.hs 8 additions, 5 deletionscompiler/GHC/HsToCore/Match.hs
- compiler/GHC/HsToCore/Quote.hs 3 additions, 3 deletionscompiler/GHC/HsToCore/Quote.hs
- compiler/GHC/Iface/Ext/Ast.hs 3 additions, 3 deletionscompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Parser.y 1 addition, 1 deletioncompiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs 1 addition, 1 deletioncompiler/GHC/Parser/PostProcess.hs
- compiler/GHC/Rename/Env.hs 24 additions, 40 deletionscompiler/GHC/Rename/Env.hs
- compiler/GHC/Rename/Expr.hs 232 additions, 52 deletionscompiler/GHC/Rename/Expr.hs
- compiler/GHC/Tc/Gen/App.hs 73 additions, 60 deletionscompiler/GHC/Tc/Gen/App.hs
- compiler/GHC/Tc/Gen/Expr.hs 66 additions, 194 deletionscompiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Gen/Expr.hs-boot 4 additions, 2 deletionscompiler/GHC/Tc/Gen/Expr.hs-boot
- compiler/GHC/Tc/Gen/Head.hs 211 additions, 78 deletionscompiler/GHC/Tc/Gen/Head.hs
- compiler/GHC/Tc/Module.hs 1 addition, 1 deletioncompiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/TyCl/PatSyn.hs 1 addition, 1 deletioncompiler/GHC/Tc/TyCl/PatSyn.hs
Loading
Please register or sign in to comment