summaryrefslogtreecommitdiff
path: root/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs')
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs26
1 files changed, 3 insertions, 23 deletions
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
index 81df7577e2..d644568b58 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOnOff.hs
@@ -1,26 +1,6 @@
-- Test purpose:
-- Ensure that -Wno-compat disables a previously set -Wcompat
-{-# LANGUAGE NoMonadFailDesugaring #-}
-{-# OPTIONS_GHC -Wcompat #-}
-{-# OPTIONS_GHC -Wno-compat #-}
-module WCompatWarningsOnOff where
-
-import qualified Data.Semigroup as Semi
-
-monadFail :: Monad m => m a
-monadFail = do
- Just _ <- undefined
- undefined
-
-(<>) = undefined -- Semigroup warnings
-
--- -fwarn-noncanonical-monoid-instances
-newtype S = S Int
-
-instance Semi.Semigroup S where
- (<>) = mappend
-
-instance Monoid S where
- S a `mappend` S b = S (a+b)
- mempty = S 0
+{-# OPTIONS_GHC -Wcompat -Wno-compat #-}
+{-# LANGUAGE CPP #-}
+#include "Template.hs"