diff options
Diffstat (limited to 'testsuite/tests/monadfail')
4 files changed, 6 insertions, 27 deletions
diff --git a/testsuite/tests/monadfail/MonadFailErrors.stderr b/testsuite/tests/monadfail/MonadFailErrors.stderr index 81ad56c910..27fc3c3cf5 100644 --- a/testsuite/tests/monadfail/MonadFailErrors.stderr +++ b/testsuite/tests/monadfail/MonadFailErrors.stderr @@ -33,19 +33,6 @@ MonadFailErrors.hs:30:5: error: = do Just x <- undefined undefined -MonadFailErrors.hs:44:5: error: - • 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 - 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 diff --git a/testsuite/tests/monadfail/MonadFailWarnings.hs b/testsuite/tests/monadfail/MonadFailWarnings.hs index a1d3729222..f540201c53 100644 --- a/testsuite/tests/monadfail/MonadFailWarnings.hs +++ b/testsuite/tests/monadfail/MonadFailWarnings.hs @@ -1,7 +1,7 @@ -- Test purpose: -- Ensure that MonadFail warnings are issued correctly if the warning flag -- is enabled - +{-# LANGUAGE NoMonadFailDesugaring #-} {-# OPTIONS_GHC -Wmissing-monadfail-instances #-} module MonadFailWarnings where diff --git a/testsuite/tests/monadfail/MonadFailWarnings.stderr b/testsuite/tests/monadfail/MonadFailWarnings.stderr index 7471bd9373..7a341fc816 100644 --- a/testsuite/tests/monadfail/MonadFailWarnings.stderr +++ b/testsuite/tests/monadfail/MonadFailWarnings.stderr @@ -33,19 +33,6 @@ MonadFailWarnings.hs:35:5: warning: [-Wmissing-monadfail-instances (in -Wcompat) = do Just x <- undefined undefined -MonadFailWarnings.hs:51:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)] - • No instance for (MonadFail (ST s)) - arising from the failable pattern ‘Just x’ - (this will become an error in a future GHC release) - • 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 - MonadFailWarnings.hs:59:5: warning: [-Wmissing-monadfail-instances (in -Wcompat)] • No instance for (MonadFail ((->) r)) arising from the failable pattern ‘Just x’ diff --git a/testsuite/tests/monadfail/MonadFailWarningsDisabled.hs b/testsuite/tests/monadfail/MonadFailWarningsDisabled.hs index d3df107a4a..c6fd34a67e 100644 --- a/testsuite/tests/monadfail/MonadFailWarningsDisabled.hs +++ b/testsuite/tests/monadfail/MonadFailWarningsDisabled.hs @@ -2,6 +2,11 @@ -- Make sure that not enabling MonadFail warnings makes code compile just -- as it did in < 8.0 +-- NOTE: starting w/ GHC 8.6 sugaring is turned on by default; so we have +-- to disable to keep supporting this test-case +-- +{-# LANGUAGE NoMonadFailDesugaring #-} + module MonadFailWarnings where import Control.Monad.Fail |