Run the renamed source plugin after each HsGroup
authorMatthew Pickering <matthew.pickering@tweag.io>
Thu, 12 Jul 2018 14:12:23 +0000 (10:12 -0400)
committerBen Gamari <ben@smart-cactus.org>
Thu, 12 Jul 2018 19:04:20 +0000 (15:04 -0400)
commit1a79270c72cfcd98d683cfe7b2c777d8dd353b78
treede1bc6a2a1484cf9d7ad4f1b9580994abc263ac6
parent305da44c86950855e2a86dee446fda2694f2f0ac
Run the renamed source plugin after each HsGroup

This allows modification of each `HsGroup` after it has been renamed.

The old behaviour of keeping the renamed source until later can be
recovered if desired by using the `keepRenamedSource` plugin but it
shouldn't really be necessary as it can be inspected in the `TcGblEnv`.

Reviewers: nboldi, bgamari, alpmestan

Reviewed By: nboldi, alpmestan

Subscribers: alpmestan, rwbarton, thomie, carter

GHC Trac Issues: #15315

Differential Revision: https://phabricator.haskell.org/D4947
compiler/main/HscMain.hs
compiler/main/Plugins.hs
compiler/typecheck/TcRnDriver.hs
docs/users_guide/extending_ghc.rst
testsuite/tests/plugins/plugins09.stdout
testsuite/tests/plugins/plugins11.stdout
testsuite/tests/plugins/simple-plugin/Simple/SourcePlugin.hs