Improve MonadFail errors by mentioning the pattern
authorDavid Luposchainsky <dluposchainsky@gmail.com>
Wed, 18 Nov 2015 11:23:57 +0000 (12:23 +0100)
committerBen Gamari <ben@smart-cactus.org>
Wed, 18 Nov 2015 11:53:51 +0000 (12:53 +0100)
commit3ee0c143a7e3e474c2c8511174702ccb8441f8d9
treea9b43214c982b74922da9cfee6fd73d1fcb267eb
parent112ce87444362f9f09e6a9ccf532f2ab5d80ad81
Improve MonadFail errors by mentioning the pattern

Example error message:

    MonadFailErrors.hs:16:5: error:
        Could not deduce (MonadFail m)
          arising from a do statement
                       with the failable pattern ‘Just x’

Depends on D1248

Reviewers: austin, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D1489
compiler/typecheck/TcMatches.hs
compiler/typecheck/TcRnTypes.hs
testsuite/tests/driver/T4437.hs
testsuite/tests/monadfail/MonadFailErrors.stderr
testsuite/tests/rebindable/rebindable6.stderr