Fix nested type splices in hie files
The issue is that when we compile a typed bracket we replace the splice with HsSpliced (unTypeCode ...). Then when computing types for > [|| T $$(...) ||] GHC is asked to compute the type of `T $$(..)`, which panics because of the bogus type of T applied to `HsSpliced`, which is not type correct. The fix is to not attempt to compute the type for `HsSpliceE` constructors if we come across them as they should have either been already evaluated or lifted into a splice environment. As part of the patch I made hie files traverse into the splice environments so now we also get type information for things used inside nested splices. Fixes #21619
parent
2cf828e8
Pipeline #57743 failed
Stage: tool-lint
Stage: quick-build
Stage: full-build
Stage: packaging
Stage: testing
Showing
- compiler/GHC/Hs/Syn/Type.hs 3 additions, 3 deletionscompiler/GHC/Hs/Syn/Type.hs
- compiler/GHC/Iface/Ext/Ast.hs 5 additions, 2 deletionscompiler/GHC/Iface/Ext/Ast.hs
- testsuite/tests/hiefile/should_compile/all.T 1 addition, 0 deletionstestsuite/tests/hiefile/should_compile/all.T
- testsuite/tests/hiefile/should_compile/hie011.hs 15 additions, 0 deletionstestsuite/tests/hiefile/should_compile/hie011.hs
- testsuite/tests/hiefile/should_compile/hie011.stderr 2 additions, 0 deletionstestsuite/tests/hiefile/should_compile/hie011.stderr
- testsuite/tests/hiefile/should_run/SpliceTypes.hs 47 additions, 0 deletionstestsuite/tests/hiefile/should_run/SpliceTypes.hs
- testsuite/tests/hiefile/should_run/SpliceTypes.stdout 9 additions, 0 deletionstestsuite/tests/hiefile/should_run/SpliceTypes.stdout
- testsuite/tests/hiefile/should_run/all.T 1 addition, 0 deletionstestsuite/tests/hiefile/should_run/all.T
Loading
Please register or sign in to comment