[commit: ghc] master: Turn on MonadFail desugaring by default (6f4449e)

git at git.haskell.org git at git.haskell.org
Tue Aug 7 19:55:45 UTC 2018


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

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

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

commit 6f4449ecf72790578b0106f32a78def58f682d9d
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Mon Aug 6 12:53:06 2018 -0400

    Turn on MonadFail desugaring by default
    
    Summary:
    This contains two commits:
    
    ----
    
    Make GHC's code-base compatible w/ `MonadFail`
    
    There were a couple of use-sites which implicitly used pattern-matches
    in `do`-notation even though the underlying `Monad` didn't explicitly
    support `fail`
    
    This refactoring turns those use-sites into explicit case
    discrimations and adds an `MonadFail` instance for `UniqSM`
    (`UniqSM` was the worst offender so this has been postponed for a
    follow-up refactoring)
    
    ---
    
    Turn on MonadFail desugaring by default
    
    This finally implements the phase scheduled for GHC 8.6 according to
    
    https://prime.haskell.org/wiki/Libraries/Proposals/MonadFail#Transitionalstrategy
    
    This also preserves some tests that assumed MonadFail desugaring to be
    active; all ghc boot libs were already made compatible with this
    `MonadFail` long ago, so no changes were needed there.
    
    Test Plan: Locally performed ./validate --fast
    
    Reviewers: bgamari, simonmar, jrtc27, RyanGlScott
    
    Reviewed By: bgamari
    
    Subscribers: bgamari, RyanGlScott, rwbarton, thomie, carter
    
    Differential Revision: https://phabricator.haskell.org/D5028


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

6f4449ecf72790578b0106f32a78def58f682d9d
 compiler/basicTypes/UniqSupply.hs                  |  6 ++++
 compiler/codeGen/StgCmmCon.hs                      |  6 ++--
 compiler/codeGen/StgCmmMonad.hs                    | 11 +++++++-
 compiler/codeGen/StgCmmPrim.hs                     | 29 +++++++++-----------
 compiler/coreSyn/MkCore.hs                         |  3 +-
 compiler/deSugar/Coverage.hs                       |  8 ++++--
 compiler/ghci/ByteCodeAsm.hs                       |  9 ++++--
 compiler/ghci/RtClosureInspect.hs                  |  6 ++--
 compiler/llvmGen/LlvmCodeGen/CodeGen.hs            | 32 ++++++++++++++++------
 compiler/main/DynFlags.hs                          |  2 ++
 compiler/main/InteractiveEval.hs                   |  6 +++-
 compiler/nativeGen/SPARC/CodeGen.hs                | 10 +++++--
 compiler/rename/RnNames.hs                         |  6 +++-
 compiler/typecheck/TcGenFunctor.hs                 | 25 ++++++++++-------
 docs/users_guide/8.6.1-notes.rst                   |  5 ++++
 docs/users_guide/glasgow_exts.rst                  |  9 +++---
 ghc/GHCi/UI.hs                                     |  9 ++++--
 testsuite/tests/deSugar/should_run/dsrun010.hs     |  2 ++
 testsuite/tests/determinism/determ017/A.hs         |  2 +-
 testsuite/tests/monadfail/MonadFailWarnings.hs     |  2 +-
 .../tests/monadfail/MonadFailWarningsDisabled.hs   |  5 ++++
 testsuite/tests/rebindable/rebindable1.hs          |  2 +-
 testsuite/tests/simplCore/should_run/T3591.hs      |  2 +-
 .../tests/wcompat-warnings/WCompatWarningsNotOn.hs |  2 +-
 .../tests/wcompat-warnings/WCompatWarningsOff.hs   |  2 +-
 .../tests/wcompat-warnings/WCompatWarningsOn.hs    |  2 +-
 .../tests/wcompat-warnings/WCompatWarningsOnOff.hs |  2 +-
 27 files changed, 139 insertions(+), 66 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 6f4449ecf72790578b0106f32a78def58f682d9d


More information about the ghc-commits mailing list