[commit: ghc] ghc-8.0: Simplify: Make generated names more useful (17f8814)

git at git.haskell.org git at git.haskell.org
Thu Mar 24 22:00:28 UTC 2016


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

On branch  : ghc-8.0
Link       : http://ghc.haskell.org/trac/ghc/changeset/17f88142bce386ff99b5130c621f09ade4c909d2/ghc

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

commit 17f88142bce386ff99b5130c621f09ade4c909d2
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Mar 11 15:24:49 2016 +0100

    Simplify: Make generated names more useful
    
    makeTrivial is responsible for concocting names during simplification.
    Previously, however, it would make no attempt to generate a name that
    might be useful to later readers of the resulting Core. Here we add a
    bit of state to SimplEnv: a finite depth stack of binders within which
    we are currently simplifying. We then derive generated binders from this
    context.
    
    See #11676.
    
    Open questions:
      * Is there a better way to accomplish this?
      * Is `maxContextDepth` too large/small?
    
    Test Plan: Validate, look at Core.
    
    Reviewers: austin, simonpj
    
    Reviewed By: simonpj
    
    Subscribers: thomie, simonpj
    
    Differential Revision: https://phabricator.haskell.org/D1970
    
    GHC Trac Issues: #11676
    
    (cherry picked from commit 4d791b4f77975422df38f6b43084008edd097f1b)


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

17f88142bce386ff99b5130c621f09ade4c909d2
 compiler/simplCore/Simplify.hs                     | 32 +++++++------
 .../tests/deSugar/should_compile/T2431.stderr      | 30 ++++++++-----
 .../tests/ghci.debugger/scripts/break009.stdout    |  2 +-
 .../tests/ghci.debugger/scripts/break010.stdout    |  4 +-
 .../tests/ghci.debugger/scripts/break011.stdout    | 22 ++++-----
 .../tests/ghci.debugger/scripts/break012.stdout    | 14 +++---
 .../tests/ghci.debugger/scripts/break028.stdout    |  4 +-
 .../tests/ghci.debugger/scripts/print018.stdout    |  6 +--
 .../tests/ghci.debugger/scripts/print031.stdout    |  2 +-
 .../tests/roles/should_compile/Roles13.stderr      | 52 +++++++++++++---------
 .../tests/simplCore/should_compile/EvalTest.stdout |  2 +-
 .../tests/simplCore/should_compile/T9400.stderr    | 10 ++---
 .../simplCore/should_compile/spec-inline.stderr    | 18 ++++----
 13 files changed, 111 insertions(+), 87 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 17f88142bce386ff99b5130c621f09ade4c909d2


More information about the ghc-commits mailing list