[commit: ghc] ghc-8.2: Fix nasty bug in w/w for absence analysis (35f8504)

git at git.haskell.org git at git.haskell.org
Mon Oct 16 20:39:50 UTC 2017


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

On branch  : ghc-8.2
Link       : http://ghc.haskell.org/trac/ghc/changeset/35f85046d7f639b8aa741069f19add754b546fdc/ghc

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

commit 35f85046d7f639b8aa741069f19add754b546fdc
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Mon Oct 2 15:25:02 2017 +0100

    Fix nasty bug in w/w for absence analysis
    
    This dark corner was exposed by Trac #14285.  It involves the
    interaction between absence analysis and INLINABLE pragmas.
    
    There is a full explanation in Note [aBSENT_ERROR_ID] in MkCore,
    which you can read there.  The changes in this patch are
    
    * Make exprIsHNF return True for absentError, treating
      absentError like an honorary data constructor.
    
    * Make absentError /not/ be diverging, unlike other error Ids.
    
    This is all a bit horrible.
    
    * While doing this I found that exprOkForSpeculation didn't
      have a case for value lambdas so I added one.  It's not
      really called on lifted types much, but it seems like the
      right thing
    
    (cherry picked from commit dbbee1bacef1a8accc630908c31cf267a3cb98a9)


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

35f85046d7f639b8aa741069f19add754b546fdc
 compiler/basicTypes/MkId.hs                        |  16 +--
 compiler/coreSyn/CoreUtils.hs                      |  29 ++++--
 compiler/coreSyn/MkCore.hs                         | 110 +++++++++++++++++++--
 compiler/simplCore/SetLevels.hs                    |   3 +-
 compiler/simplCore/Simplify.hs                     | 100 +++++++++----------
 compiler/stranal/WwLib.hs                          |  37 ++++---
 testsuite/tests/stranal/should_run/T14285.hs       |   9 ++
 .../tests/stranal/should_run/T14285.stdout         |   0
 testsuite/tests/stranal/should_run/T14285a.hs      |  37 +++++++
 testsuite/tests/stranal/should_run/all.T           |   1 +
 10 files changed, 246 insertions(+), 96 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 35f85046d7f639b8aa741069f19add754b546fdc


More information about the ghc-commits mailing list