From bf3329104c971c84ab178f3ded88254b9594f9cc Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sun, 28 Sep 2014 12:01:13 +0200 Subject: Generalise `guard` for real this time This was missed in D253 / a07ce1654ac5b8033f2daf9270c6e182415b69ca --- libraries/base/Control/Monad.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.1