MonadFail proposal, phase 1
authorDavid Luposchainsky <dluposchainsky@gmail.com>
Tue, 17 Nov 2015 16:10:02 +0000 (17:10 +0100)
committerBen Gamari <bgamari.foss@gmail.com>
Tue, 17 Nov 2015 17:29:09 +0000 (12:29 -0500)
commit233d1312bf15940fca5feca6884f965e7944b555
tree0f787688562e65c1043626d8d03447ef2ab0b7a7
parent7b962bab384e2ae85b41d30f503c3d0295b0214f
MonadFail proposal, phase 1

This implements phase 1 of the MonadFail proposal (MFP, #10751).

- MonadFail warnings are all issued as desired, tunable with two new flags
- GHC was *not* made warning-free with `-fwarn-missing-monadfail-warnings`
  (but it's disabled by default right now)

Credits/thanks to
- Franz Thoma, whose help was crucial to implementing this
- My employer TNG Technology Consulting GmbH for partially funding us
  for this work

Reviewers: goldfire, austin, #core_libraries_committee, hvr, bgamari, fmthoma

Reviewed By: hvr, bgamari, fmthoma

Subscribers: thomie

Projects: #ghc

Differential Revision: https://phabricator.haskell.org/D1248

GHC Trac Issues: #10751
35 files changed:
compiler/coreSyn/CoreLint.hs
compiler/hsSyn/HsExpr.hs
compiler/main/DynFlags.hs
compiler/parser/Lexer.x
compiler/prelude/PrelNames.hs
compiler/prelude/PrelRules.hs
compiler/rename/RnEnv.hs
compiler/rename/RnExpr.hs
compiler/specialise/Specialise.hs
compiler/typecheck/TcArrows.hs
compiler/typecheck/TcErrors.hs
compiler/typecheck/TcMatches.hs
compiler/typecheck/TcRnDriver.hs
compiler/typecheck/TcRnTypes.hs
compiler/typecheck/TcSMonad.hs
compiler/types/Unify.hs
compiler/utils/IOEnv.hs
compiler/utils/Maybes.hs
docs/users_guide/glasgow_exts.rst
docs/users_guide/using-warnings.rst
libraries/base/Control/Monad.hs
libraries/base/Text/ParserCombinators/ReadP.hs
libraries/base/Text/ParserCombinators/ReadPrec.hs
testsuite/tests/driver/T4437.hs
testsuite/tests/monadfail/MonadFailErrors.hs [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailErrors.stderr [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailWarnings.hs [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailWarnings.stderr [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailWarningsDisabled.hs [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs [new file with mode: 0644]
testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.stderr [new file with mode: 0644]
testsuite/tests/monadfail/all.T [new file with mode: 0644]
testsuite/tests/rebindable/rebindable1.hs
testsuite/tests/rebindable/rebindable6.hs
testsuite/tests/rebindable/rebindable6.stderr