Fixes to dealing with the export of main
It's surprisingly tricky to deal with 'main' (#19397). This patch does quite bit of refactoring do to it right. Well, more-right anyway! The moving parts are documented in GHC.Tc.Module Note [Dealing with main] Some other oddments: * Rename tcRnExports to rnExports; no typechecking here! * rnExports now uses checkNoErrs rather than failIfErrsM; the former fails only if rnExports itself finds errors * Small improvements to tcTyThingCategory, which ultimately weren't important to the patch, but I've retained as a minor improvement.
Showing
- compiler/GHC/Rename/Env.hs 2 additions, 1 deletioncompiler/GHC/Rename/Env.hs
- compiler/GHC/Tc/Gen/Export.hs 38 additions, 37 deletionscompiler/GHC/Tc/Gen/Export.hs
- compiler/GHC/Tc/Module.hs 317 additions, 303 deletionscompiler/GHC/Tc/Module.hs
- compiler/GHC/Tc/Types.hs 24 additions, 14 deletionscompiler/GHC/Tc/Types.hs
- compiler/GHC/Tc/Utils/Env.hs 1 addition, 1 deletioncompiler/GHC/Tc/Utils/Env.hs
- testsuite/tests/module/T11970B.hs 2 additions, 2 deletionstestsuite/tests/module/T11970B.hs
- testsuite/tests/patsyn/should_fail/records-mixing-fields.stderr 10 additions, 13 deletions...ite/tests/patsyn/should_fail/records-mixing-fields.stderr
- testsuite/tests/quantified-constraints/T17267e.stderr 0 additions, 3 deletionstestsuite/tests/quantified-constraints/T17267e.stderr
- testsuite/tests/quotes/T18263.hs 8 additions, 1 deletiontestsuite/tests/quotes/T18263.hs
- testsuite/tests/quotes/T18263.stderr 1 addition, 3 deletionstestsuite/tests/quotes/T18263.stderr
- testsuite/tests/quotes/all.T 1 addition, 1 deletiontestsuite/tests/quotes/all.T
- testsuite/tests/th/TH_finalizer2M.hs 1 addition, 1 deletiontestsuite/tests/th/TH_finalizer2M.hs
- testsuite/tests/typecheck/should_fail/T12906.stderr 0 additions, 3 deletionstestsuite/tests/typecheck/should_fail/T12906.stderr
- testsuite/tests/typecheck/should_fail/T13292.hs 5 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T13292.hs
- testsuite/tests/typecheck/should_fail/T13292.stderr 6 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T13292.stderr
- testsuite/tests/typecheck/should_fail/T16453E2.stderr 9 additions, 9 deletionstestsuite/tests/typecheck/should_fail/T16453E2.stderr
- testsuite/tests/typecheck/should_fail/T19397E1.hs 5 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T19397E1.hs
- testsuite/tests/typecheck/should_fail/T19397E1.stderr 8 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T19397E1.stderr
- testsuite/tests/typecheck/should_fail/T19397E2.hs 5 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T19397E2.hs
- testsuite/tests/typecheck/should_fail/T19397E2.stderr 8 additions, 0 deletionstestsuite/tests/typecheck/should_fail/T19397E2.stderr
Loading
Please register or sign in to comment