Skip to content

Fixes to dealing with the export of main (Fix #19397)

Simon Peyton Jones requested to merge wip/T19397 into master

It's surprisingly tricky to deal with 'main' (#19397 (closed)). 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.

Edited by Roland Senn

Merge request reports