diff options
author | David Luposchainsky <dluposchainsky@gmail.com> | 2015-11-17 17:10:02 +0100 |
---|---|---|
committer | Ben Gamari <bgamari.foss@gmail.com> | 2015-11-17 12:29:09 -0500 |
commit | 233d1312bf15940fca5feca6884f965e7944b555 (patch) | |
tree | 0f787688562e65c1043626d8d03447ef2ab0b7a7 /testsuite/tests/monadfail/MonadFailErrors.stderr | |
parent | 7b962bab384e2ae85b41d30f503c3d0295b0214f (diff) | |
download | haskell-233d1312bf15940fca5feca6884f965e7944b555.tar.gz |
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
Diffstat (limited to 'testsuite/tests/monadfail/MonadFailErrors.stderr')
-rw-r--r-- | testsuite/tests/monadfail/MonadFailErrors.stderr | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/testsuite/tests/monadfail/MonadFailErrors.stderr b/testsuite/tests/monadfail/MonadFailErrors.stderr new file mode 100644 index 0000000000..ad661772c7 --- /dev/null +++ b/testsuite/tests/monadfail/MonadFailErrors.stderr @@ -0,0 +1,74 @@ + +MonadFailErrors.hs:16:5: error: + Could not deduce (MonadFail m) arising from a do statement + from the context: Monad m + bound by the type signature for: + general :: Monad m => m a + at MonadFailErrors.hs:14:12-25 + Possible fix: + add (MonadFail m) to the context of + the type signature for: + general :: Monad m => m a + In a stmt of a 'do' block: Just x <- undefined + In the expression: + do { Just x <- undefined; + undefined } + In an equation for ‘general’: + general + = do { Just x <- undefined; + undefined } + +MonadFailErrors.hs:30:5: error: + No instance for (MonadFail Identity) arising from a do statement + In a stmt of a 'do' block: Just x <- undefined + In the expression: + do { Just x <- undefined; + undefined } + In an equation for ‘identity’: + identity + = do { Just x <- undefined; + undefined } + +MonadFailErrors.hs:44:5: error: + No instance for (MonadFail (ST s)) arising from a do statement + In a stmt of a 'do' block: Just x <- undefined + In the expression: + do { Just x <- undefined; + undefined } + In an equation for ‘st’: + st + = do { Just x <- undefined; + undefined } + +MonadFailErrors.hs:51:5: error: + No instance for (MonadFail ((->) r)) arising from a do statement + In a stmt of a 'do' block: Just x <- undefined + In the expression: + do { Just x <- undefined; + undefined } + In an equation for ‘reader’: + reader + = do { Just x <- undefined; + undefined } + +MonadFailErrors.hs:59:5: error: + No instance for (MonadFail Identity) arising from a do statement + In a stmt of a 'do' block: Newtype x <- undefined + In the expression: + do { Newtype x <- undefined; + undefined } + In an equation for ‘newtypeMatch’: + newtypeMatch + = do { Newtype x <- undefined; + undefined } + +MonadFailErrors.hs:67:5: error: + No instance for (MonadFail Identity) arising from a do statement + In a stmt of a 'do' block: Data x <- undefined + In the expression: + do { Data x <- undefined; + undefined } + In an equation for ‘singleConMatch’: + singleConMatch + = do { Data x <- undefined; + undefined } |