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
Showing
- compiler/basicTypes/UniqSupply.hs 6 additions, 0 deletionscompiler/basicTypes/UniqSupply.hs
- compiler/codeGen/StgCmmCon.hs 4 additions, 2 deletionscompiler/codeGen/StgCmmCon.hs
- compiler/codeGen/StgCmmMonad.hs 10 additions, 1 deletioncompiler/codeGen/StgCmmMonad.hs
- compiler/codeGen/StgCmmPrim.hs 13 additions, 16 deletionscompiler/codeGen/StgCmmPrim.hs
- compiler/coreSyn/MkCore.hs 2 additions, 1 deletioncompiler/coreSyn/MkCore.hs
- compiler/deSugar/Coverage.hs 6 additions, 2 deletionscompiler/deSugar/Coverage.hs
- compiler/ghci/ByteCodeAsm.hs 6 additions, 3 deletionscompiler/ghci/ByteCodeAsm.hs
- compiler/ghci/RtClosureInspect.hs 4 additions, 2 deletionscompiler/ghci/RtClosureInspect.hs
- compiler/llvmGen/LlvmCodeGen/CodeGen.hs 23 additions, 9 deletionscompiler/llvmGen/LlvmCodeGen/CodeGen.hs
- compiler/main/DynFlags.hs 2 additions, 0 deletionscompiler/main/DynFlags.hs
- compiler/main/InteractiveEval.hs 5 additions, 1 deletioncompiler/main/InteractiveEval.hs
- compiler/nativeGen/SPARC/CodeGen.hs 8 additions, 2 deletionscompiler/nativeGen/SPARC/CodeGen.hs
- compiler/rename/RnNames.hs 5 additions, 1 deletioncompiler/rename/RnNames.hs
- compiler/typecheck/TcGenFunctor.hs 15 additions, 10 deletionscompiler/typecheck/TcGenFunctor.hs
- docs/users_guide/8.6.1-notes.rst 5 additions, 0 deletionsdocs/users_guide/8.6.1-notes.rst
- docs/users_guide/glasgow_exts.rst 4 additions, 5 deletionsdocs/users_guide/glasgow_exts.rst
- ghc/GHCi/UI.hs 6 additions, 3 deletionsghc/GHCi/UI.hs
- testsuite/tests/annotations/should_run/annrun01.hs 2 additions, 1 deletiontestsuite/tests/annotations/should_run/annrun01.hs
- testsuite/tests/deSugar/should_run/dsrun010.hs 2 additions, 0 deletionstestsuite/tests/deSugar/should_run/dsrun010.hs
- testsuite/tests/determinism/determ017/A.hs 1 addition, 1 deletiontestsuite/tests/determinism/determ017/A.hs
Loading
Please register or sign in to comment