diff options
author | David Luposchainsky <dluposchainsky@gmail.com> | 2015-11-18 12:23:57 +0100 |
---|---|---|
committer | Ben Gamari <ben@smart-cactus.org> | 2015-11-18 12:53:51 +0100 |
commit | 3ee0c143a7e3e474c2c8511174702ccb8441f8d9 (patch) | |
tree | a9b43214c982b74922da9cfee6fd73d1fcb267eb /testsuite/tests/monadfail/MonadFailErrors.stderr | |
parent | 112ce87444362f9f09e6a9ccf532f2ab5d80ad81 (diff) | |
download | haskell-3ee0c143a7e3e474c2c8511174702ccb8441f8d9.tar.gz |
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
Diffstat (limited to 'testsuite/tests/monadfail/MonadFailErrors.stderr')
-rw-r--r-- | testsuite/tests/monadfail/MonadFailErrors.stderr | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/testsuite/tests/monadfail/MonadFailErrors.stderr b/testsuite/tests/monadfail/MonadFailErrors.stderr index ad661772c7..17807a4be0 100644 --- a/testsuite/tests/monadfail/MonadFailErrors.stderr +++ b/testsuite/tests/monadfail/MonadFailErrors.stderr @@ -1,6 +1,8 @@ MonadFailErrors.hs:16:5: error: - Could not deduce (MonadFail m) arising from a do statement + Could not deduce (MonadFail m) + arising from a do statement + with the failable pattern ‘Just x’ from the context: Monad m bound by the type signature for: general :: Monad m => m a @@ -19,7 +21,9 @@ MonadFailErrors.hs:16:5: error: undefined } MonadFailErrors.hs:30:5: error: - No instance for (MonadFail Identity) arising from a do statement + No instance for (MonadFail Identity) + arising from a do statement + with the failable pattern ‘Just x’ In a stmt of a 'do' block: Just x <- undefined In the expression: do { Just x <- undefined; @@ -30,7 +34,9 @@ MonadFailErrors.hs:30:5: error: undefined } MonadFailErrors.hs:44:5: error: - No instance for (MonadFail (ST s)) arising from a do statement + No instance for (MonadFail (ST s)) + arising from a do statement + with the failable pattern ‘Just x’ In a stmt of a 'do' block: Just x <- undefined In the expression: do { Just x <- undefined; @@ -41,7 +47,9 @@ MonadFailErrors.hs:44:5: error: undefined } MonadFailErrors.hs:51:5: error: - No instance for (MonadFail ((->) r)) arising from a do statement + No instance for (MonadFail ((->) r)) + arising from a do statement + with the failable pattern ‘Just x’ In a stmt of a 'do' block: Just x <- undefined In the expression: do { Just x <- undefined; @@ -52,7 +60,9 @@ MonadFailErrors.hs:51:5: error: undefined } MonadFailErrors.hs:59:5: error: - No instance for (MonadFail Identity) arising from a do statement + No instance for (MonadFail Identity) + arising from a do statement + with the failable pattern ‘Newtype x’ In a stmt of a 'do' block: Newtype x <- undefined In the expression: do { Newtype x <- undefined; @@ -63,7 +73,9 @@ MonadFailErrors.hs:59:5: error: undefined } MonadFailErrors.hs:67:5: error: - No instance for (MonadFail Identity) arising from a do statement + No instance for (MonadFail Identity) + arising from a do statement + with the failable pattern ‘Data x’ In a stmt of a 'do' block: Data x <- undefined In the expression: do { Data x <- undefined; |