summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-09-28 12:01:13 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2014-09-28 12:01:13 +0200
commitbf3329104c971c84ab178f3ded88254b9594f9cc (patch)
tree7147bf851f3fca5b320ce2d6b3a5636e5400c86e
parenta07ce1654ac5b8033f2daf9270c6e182415b69ca (diff)
downloadhaskell-bf3329104c971c84ab178f3ded88254b9594f9cc.tar.gz
Generalise `guard` for real this time
This was missed in D253 / a07ce1654ac5b8033f2daf9270c6e182415b69ca
-rw-r--r--libraries/base/Control/Monad.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/libraries/base/Control/Monad.hs b/libraries/base/Control/Monad.hs
index 94318be738..619a2bad94 100644
--- a/libraries/base/Control/Monad.hs
+++ b/libraries/base/Control/Monad.hs
@@ -87,7 +87,7 @@ import GHC.List ( zipWith, unzip, replicate )
-- | @'guard' b@ is @'pure' ()@ if @b@ is 'True',
-- and 'empty' if @b@ is 'False'.
-guard :: (MonadPlus m) => Bool -> m ()
+guard :: (Alternative f) => Bool -> f ()
guard True = pure ()
guard False = empty