03f9a4957ed0ad4c67bfa2ba4714d653d71c1f6e
[ghc.git] / testsuite / tests / wcompat-warnings / Template.hs
1 {-# LANGUAGE NoMonadFailDesugaring, KindSignatures #-}
2
3 module WCompatWarningsOnOff where
4
5 import qualified Data.Semigroup as Semi
6
7 monadFail :: Monad m => m a
8 monadFail = do
9 Just _ <- undefined
10 undefined
11
12 (<>) = undefined -- Semigroup warnings
13
14 -- -fwarn-noncanonical-monoid-instances
15 newtype S = S Int
16
17 instance Semi.Semigroup S where
18 (<>) = mappend
19
20 instance Monoid S where
21 S a `mappend` S b = S (a+b)
22 mempty = S 0
23
24 -- -fwarn-star-is-type
25 b :: (Bool :: *)
26 b = True