[commit: ghc] master: Fix nasty bug in w/w for absence analysis (dbbee1b)

git at git.haskell.org git at git.haskell.org
Tue Oct 3 13:45:32 UTC 2017


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

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

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

commit dbbee1bacef1a8accc630908c31cf267a3cb98a9
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


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

dbbee1bacef1a8accc630908c31cf267a3cb98a9
 compiler/basicTypes/MkId.hs                        |  16 +--
 compiler/coreSyn/CoreUtils.hs                      |  32 +++---
 compiler/coreSyn/MkCore.hs                         | 110 +++++++++++++++++++--
 compiler/simplCore/Simplify.hs                     |  98 +++++++++---------
 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 +
 9 files changed, 244 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 dbbee1bacef1a8accc630908c31cf267a3cb98a9


More information about the ghc-commits mailing list