Skip to content

Commit

Permalink
Pacify warnings: define mappend canonically as (<>)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasabel committed Nov 1, 2023
1 parent 88aefff commit 34395e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/Control/Foldl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ instance Monoid b => Monoid (Fold a b) where
mempty = pure mempty
{-# INLINE mempty #-}

mappend = liftA2 mappend
mappend = (<>)
{-# INLINE mappend #-}

instance Num b => Num (Fold a b) where
Expand Down Expand Up @@ -434,7 +434,7 @@ instance (Monoid b, Monad m) => Monoid (FoldM m a b) where
mempty = pure mempty
{-# INLINE mempty #-}

mappend = liftA2 mappend
mappend = (<>)
{-# INLINE mappend #-}

instance (Monad m, Num b) => Num (FoldM m a b) where
Expand Down
2 changes: 1 addition & 1 deletion src/Control/Foldl/NonEmpty.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ instance Monoid b => Monoid (Fold1 a b) where
mempty = pure mempty
{-# INLINE mempty #-}

mappend = liftA2 mappend
mappend = (<>)
{-# INLINE mappend #-}

instance Num b => Num (Fold1 a b) where
Expand Down
4 changes: 2 additions & 2 deletions src/Control/Scanl.hs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ instance Monoid b => Monoid (Scan a b) where
mempty = pure mempty
{-# INLINE mempty #-}

mappend = liftA2 mappend
mappend = (<>)
{-# INLINE mappend #-}

instance Num b => Num (Scan a b) where
Expand Down Expand Up @@ -299,7 +299,7 @@ instance (Monad m, Monoid b) => Monoid (ScanM m a b) where
mempty = pure mempty
{-# INLINE mempty #-}

mappend = liftA2 mappend
mappend = (<>)
{-# INLINE mappend #-}

instance (Monad m, Num b) => Num (ScanM m a b) where
Expand Down

0 comments on commit 34395e9

Please sign in to comment.