diff options
author | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-28 12:01:13 +0200 |
---|---|---|
committer | Herbert Valerio Riedel <hvr@gnu.org> | 2014-09-28 12:01:13 +0200 |
commit | bf3329104c971c84ab178f3ded88254b9594f9cc (patch) | |
tree | 7147bf851f3fca5b320ce2d6b3a5636e5400c86e | |
parent | a07ce1654ac5b8033f2daf9270c6e182415b69ca (diff) | |
download | haskell-bf3329104c971c84ab178f3ded88254b9594f9cc.tar.gz |
Generalise `guard` for real this time
This was missed in D253 / a07ce1654ac5b8033f2daf9270c6e182415b69ca
-rw-r--r-- | libraries/base/Control/Monad.hs | 2 |
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 |