Skip to content
Snippets Groups Projects
Commit bf332910 authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel :man_dancing:
Browse files

Generalise `guard` for real this time

This was missed in D253 / a07ce165
parent a07ce165
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment