[commit: ghc] master: Implement "An API for deciding whether plugins should cause recompilation" (1d1e2b7)

git at git.haskell.org git at git.haskell.org
Wed May 30 22:07:14 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/1d1e2b77fdc2babdf4fff72b9120c6831e7b422f/ghc

>---------------------------------------------------------------

commit 1d1e2b77fdc2babdf4fff72b9120c6831e7b422f
Author: Matthew Pickering <matthew.pickering at tweag.io>
Date:   Sun May 27 11:57:27 2018 -0400

    Implement "An API for deciding whether plugins should cause recompilation"
    
    This patch implements the API proposed as pull request #108 for plugin
    authors to influence the recompilation checker.
    
    It adds a new field to a plugin which computes a `FingerPrint`. This is
    recorded in interface files and if it changes then we recompile the
    module. There are also helper functions such as `purePlugin` and
    `impurePlugin` for constructing plugins which have simple recompilation
    semantics but in general, an author can compute a hash as they wish.
    
    Fixes #12567 and #7414
    
    https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/002
    2-plugin-recompilation.rst
    
    Reviewers: bgamari, ggreif
    
    Reviewed By: bgamari
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #7414, #12567
    
    Differential Revision: https://phabricator.haskell.org/D4366


>---------------------------------------------------------------

1d1e2b77fdc2babdf4fff72b9120c6831e7b422f
 compiler/deSugar/Desugar.hs                        |  6 +-
 compiler/deSugar/DsUsage.hs                        | 21 +++++--
 compiler/iface/LoadIface.hs                        |  1 +
 compiler/iface/MkIface.hs                          | 70 +++++++++++++++++++++-
 compiler/main/DynamicLoading.hs                    | 18 +++---
 compiler/main/HscTypes.hs                          |  6 ++
 compiler/main/Plugins.hs                           | 64 +++++++++++++++++---
 compiler/simplCore/CoreMonad.hs                    |  6 +-
 compiler/simplCore/SimplCore.hs                    |  5 +-
 docs/users_guide/extending_ghc.rst                 | 57 ++++++++++++++++++
 testsuite/tests/plugins/Makefile                   | 27 ++++++++-
 testsuite/tests/plugins/T12567a.stderr             |  5 --
 testsuite/tests/plugins/all.T                      | 18 ++++++
 testsuite/tests/plugins/plugin-recomp-flags.stderr |  6 ++
 testsuite/tests/plugins/plugin-recomp-flags.stdout |  4 ++
 .../tests/plugins/plugin-recomp-impure.stderr      |  6 ++
 .../tests/plugins/plugin-recomp-impure.stdout      |  4 ++
 testsuite/tests/plugins/plugin-recomp-pure.stderr  |  3 +
 testsuite/tests/plugins/plugin-recomp-pure.stdout  |  2 +
 testsuite/tests/plugins/plugin-recomp-test.hs      |  8 +++
 testsuite/tests/plugins/plugin-recomp/Common.hs    | 17 ++++++
 .../plugins/plugin-recomp/FingerprintPlugin.hs     | 10 ++++
 .../tests/plugins/plugin-recomp/ImpurePlugin.hs    | 10 ++++
 .../LICENSE                                        |  0
 .../{simple-plugin => plugin-recomp}/Makefile      |  0
 .../tests/plugins/plugin-recomp/PurePlugin.hs      | 10 ++++
 .../Setup.hs                                       |  0
 .../plugins/plugin-recomp/plugin-recomp.cabal      | 20 +++++++
 .../tests/plugins/simple-plugin/Simple/Plugin.hs   |  3 +-
 29 files changed, 371 insertions(+), 36 deletions(-)

Diff suppressed because of size. To see it, use:

    git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 1d1e2b77fdc2babdf4fff72b9120c6831e7b422f


More information about the ghc-commits mailing list