blob: 2a9a11b0c40f2797065b537fa173c874666c74bc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
module WCompatWarningsOnOff where
import qualified Data.Semigroup as Semi
(<>) = 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
|