• Herbert Valerio Riedel's avatar
    Turn on MonadFail desugaring by default · aab8656b
    Herbert Valerio Riedel authored
    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
    aab8656b
Name
Last commit
Last update
..
should_compile Loading commit data...
should_fail Loading commit data...
should_run Loading commit data...
Makefile Loading commit data...