Correct type of static forms in hsExprType
The simplest way to do this seemed to be to persist the whole type in the extension field from the typechecker so that the few relevant places * Desugaring can work out the return type by splitting this type rather than calling `dsExpr` (slightly more efficient). * hsExprType can just return the correct type. * Zonking has to now zonk the type as well The other option we considered was wiring in StaticPtr but that is actually quite tricky because StaticPtr refers to StaticPtrInfo which has field selectors (which we can't easily wire in). Fixes #20150
Showing
- compiler/GHC/Builtin/Types.hs 0 additions, 1 deletioncompiler/GHC/Builtin/Types.hs
- compiler/GHC/Hs/Expr.hs 3 additions, 1 deletioncompiler/GHC/Hs/Expr.hs
- compiler/GHC/Hs/Syn/Type.hs 1 addition, 1 deletioncompiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/HsToCore/Expr.hs 2 additions, 2 deletionscompiler/GHC/HsToCore/Expr.hs
- compiler/GHC/Iface/Ext/Ast.hs 0 additions, 1 deletioncompiler/GHC/Iface/Ext/Ast.hs
- compiler/GHC/Tc/Gen/Expr.hs 2 additions, 1 deletioncompiler/GHC/Tc/Gen/Expr.hs
- compiler/GHC/Tc/Utils/Zonk.hs 3 additions, 2 deletionscompiler/GHC/Tc/Utils/Zonk.hs
- compiler/Language/Haskell/Syntax/Expr.hs 1 addition, 1 deletioncompiler/Language/Haskell/Syntax/Expr.hs
- testsuite/tests/ghci/scripts/T20150.hs 9 additions, 0 deletionstestsuite/tests/ghci/scripts/T20150.hs
- testsuite/tests/ghci/scripts/T20150.script 3 additions, 0 deletionstestsuite/tests/ghci/scripts/T20150.script
- testsuite/tests/ghci/scripts/T20150.stdout 6 additions, 0 deletionstestsuite/tests/ghci/scripts/T20150.stdout
- testsuite/tests/ghci/scripts/all.T 1 addition, 0 deletionstestsuite/tests/ghci/scripts/all.T
Loading
Please register or sign in to comment