sequenceByA_ can have a slightly nicer signature

This commit is contained in:
Edward Kmett 2015-03-08 10:43:47 +00:00
parent a28de13a26
commit de607d0bd8
2 changed files with 2 additions and 1 deletions

View File

@ -2,6 +2,7 @@
* Build warning-free on GHC 7.10+
* Added an HLint configuration
* Removed a redundant constraint from the type of `sequenceByA_`.
/1.5/

View File

@ -294,7 +294,7 @@ sequenceA_ :: (Foldable t, Applicative f, Eq (f ())) => (Int -> f b) -> t (f a)
sequenceA_ = sequenceByA_ (==)
{-# INLINE sequenceA_ #-}
sequenceByA_ :: (Foldable t, Applicative f, Eq (f ())) => (f () -> f () -> Bool) -> (Int -> f b) -> t (f a) -> f ()
sequenceByA_ :: (Foldable t, Applicative f) => (f () -> f () -> Bool) -> (Int -> f b) -> t (f a) -> f ()
sequenceByA_ cmp g = foldrBy cmp ((()<$) . g) (*>) (pure ())
{-# INLINE sequenceByA_ #-}