summaryrefslogtreecommitdiff
path: root/testsuite/tests/cpranal
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/cpranal
parentbf2411a3c198cb2df93a9e0aa0c3b8297f47058d (diff)
downloadhaskell-e60ae8a38394370fd8818ad004a101466fc7d2dc.tar.gz
Add -Wnoncanonical-{monad,monoid}-instances to standardWarnings
------------------------- Metric Decrease: T12425 Metric Increase: T17516 -------------------------
Diffstat (limited to 'testsuite/tests/cpranal')
-rw-r--r--testsuite/tests/cpranal/should_compile/Cpr001_imp.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/testsuite/tests/cpranal/should_compile/Cpr001_imp.hs b/testsuite/tests/cpranal/should_compile/Cpr001_imp.hs
index e5175b658d..a151a2a909 100644
--- a/testsuite/tests/cpranal/should_compile/Cpr001_imp.hs
+++ b/testsuite/tests/cpranal/should_compile/Cpr001_imp.hs
@@ -25,7 +25,7 @@ instance Functor (StateTrans s) where
fmap = liftM
instance Applicative (StateTrans s) where
- pure = return
+ pure v= ST (\s -> (s, Just v))
(<*>) = ap
instance Monad (StateTrans s) where
@@ -40,8 +40,6 @@ instance Monad (StateTrans s) where
q s1
Nothing -> (s1, Nothing)
)
- return v
- = ST (\s -> (s, Just v))
-- machine state transitions