summaryrefslogtreecommitdiff
path: root/testsuite/tests/deriving
diff options
context:
space:
mode:
authorFumiaki Kinoshita <fumiexcel@gmail.com>2020-07-15 21:12:07 +0900
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-10-14 18:06:12 -0400
commite60ae8a38394370fd8818ad004a101466fc7d2dc (patch)
tree6eff280150db65ae373aba5d50f550180b99983b /testsuite/tests/deriving
parentbf2411a3c198cb2df93a9e0aa0c3b8297f47058d (diff)
downloadhaskell-e60ae8a38394370fd8818ad004a101466fc7d2dc.tar.gz
Add -Wnoncanonical-{monad,monoid}-instances to standardWarnings
------------------------- Metric Decrease: T12425 Metric Increase: T17516 -------------------------
Diffstat (limited to 'testsuite/tests/deriving')
-rw-r--r--testsuite/tests/deriving/should_compile/drv020.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/testsuite/tests/deriving/should_compile/drv020.hs b/testsuite/tests/deriving/should_compile/drv020.hs
index bd5c8f4235..fc1f953715 100644
--- a/testsuite/tests/deriving/should_compile/drv020.hs
+++ b/testsuite/tests/deriving/should_compile/drv020.hs
@@ -22,11 +22,10 @@ instance Functor (State s) where
fmap = liftM
instance Applicative (State s) where
- pure = return
+ pure a = State $ \s -> (a, s)
(<*>) = ap
instance Monad (State s) where
- return a = State $ \s -> (a, s)
m >>= k = State $ \s -> let
(a, s') = runState m s
in runState (k a) s'