summaryrefslogtreecommitdiff
path: root/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs')
-rw-r--r--testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs24
1 files changed, 2 insertions, 22 deletions
diff --git a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
index c155f37f42..9c7598269b 100644
--- a/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
+++ b/testsuite/tests/wcompat-warnings/WCompatWarningsOn.hs
@@ -2,25 +2,5 @@
-- Ensure that -Wcompat switches on the right warnings
{-# OPTIONS_GHC -Wcompat #-}
--- {-# OPTIONS_GHC -Wno-compat #-}
-
-module WCompatWarningsOn 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 Semi.Monoid S where
- S a `mappend` S b = S (a+b)
- mempty = S 0
+{-# LANGUAGE CPP #-}
+#include "Template.hs"