summaryrefslogtreecommitdiff
path: root/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs')
-rw-r--r--testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs14
1 files changed, 14 insertions, 0 deletions
diff --git a/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs b/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs
new file mode 100644
index 0000000000..c9f25027f9
--- /dev/null
+++ b/testsuite/tests/monadfail/MonadFailWarningsWithRebindableSyntax.hs
@@ -0,0 +1,14 @@
+-- Test purpose:
+-- RebindableSyntax does not play that well with MonadFail, so here we ensure
+-- that when both settings are enabled we get the proper warning.
+
+{-# OPTIONS_GHC -fwarn-missing-monadfail-instance #-}
+{-# LANGUAGE RebindableSyntax #-}
+
+module MonadFailWarningsWithRebindableSyntax where
+
+import Prelude
+
+test1 f g = do
+ Just x <- f
+ g