Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Control/Applicative/Lift.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,8 @@

import Control.Applicative
import Data.Functor.Constant
import Data.Foldable (Foldable(foldMap))

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 38 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Foldable’ is redundant
import Data.Monoid (Monoid(..))
Comment thread
sjshuck marked this conversation as resolved.
import Data.Traversable (Traversable(traverse))

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 39 in Control/Applicative/Lift.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Traversable’ is redundant
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down
17 changes: 8 additions & 9 deletions Control/Monad/Trans/Accum.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ import Control.Monad
import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Control.Monad.Signatures
import Data.Monoid
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down Expand Up @@ -106,7 +105,7 @@ execAccum m w = snd (runAccum m w)
-- and return the final value, discarding the final output.
--
-- * @'evalAccum' m w = 'fst' ('runAccum' m w)@
evalAccum :: (Monoid w) => Accum w a -> w -> a
evalAccum :: Accum w a -> w -> a
evalAccum m w = fst (runAccum m w)
{-# INLINE evalAccum #-}

Expand Down Expand Up @@ -164,7 +163,7 @@ execAccumT m w = do
-- history and return the final value, discarding the final output.
--
-- * @'evalAccumT' m w = 'liftM' 'fst' ('runAccumT' m w)@
evalAccumT :: (Monad m, Monoid w) => AccumT w m a -> w -> m a
evalAccumT :: (Monad m) => AccumT w m a -> w -> m a
evalAccumT m w = do
~(a, _) <- runAccumT m w
return a
Expand All @@ -182,7 +181,7 @@ instance (Functor m) => Functor (AccumT w m) where
fmap f = mapAccumT $ fmap $ \ ~(a, w) -> (f a, w)
{-# INLINE fmap #-}

instance (Monoid w, Functor m, Monad m) => Applicative (AccumT w m) where
instance (Monoid w, Monad m) => Applicative (AccumT w m) where
pure a = AccumT $ const $ return (a, mempty)
{-# INLINE pure #-}
mf <*> mv = AccumT $ \ w -> do
Expand All @@ -191,13 +190,13 @@ instance (Monoid w, Functor m, Monad m) => Applicative (AccumT w m) where
return (f v, w' `mappend` w'')
{-# INLINE (<*>) #-}

instance (Monoid w, Functor m, MonadPlus m) => Alternative (AccumT w m) where
instance (Monoid w, MonadPlus m) => Alternative (AccumT w m) where
empty = AccumT $ const mzero
{-# INLINE empty #-}
m <|> n = AccumT $ \ w -> runAccumT m w `mplus` runAccumT n w
{-# INLINE (<|>) #-}

instance (Monoid w, Functor m, Monad m) => Monad (AccumT w m) where
instance (Monoid w, Monad m) => Monad (AccumT w m) where
m >>= k = AccumT $ \ w -> do
~(a, w') <- runAccumT m w
~(b, w'') <- runAccumT (k a) (w `mappend` w')
Expand All @@ -208,13 +207,13 @@ instance (Monoid w, Fail.MonadFail m) => Fail.MonadFail (AccumT w m) where
fail msg = AccumT $ const (Fail.fail msg)
{-# INLINE fail #-}

instance (Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) where
instance (Monoid w, MonadPlus m) => MonadPlus (AccumT w m) where
mzero = AccumT $ const mzero
{-# INLINE mzero #-}
m `mplus` n = AccumT $ \ w -> runAccumT m w `mplus` runAccumT n w
{-# INLINE mplus #-}

instance (Monoid w, Functor m, MonadFix m) => MonadFix (AccumT w m) where
instance (Monoid w, MonadFix m) => MonadFix (AccumT w m) where
mfix m = AccumT $ \ w -> mfix $ \ ~(a, _) -> runAccumT (m a) w
{-# INLINE mfix #-}

Expand All @@ -224,7 +223,7 @@ instance (Monoid w) => MonadTrans (AccumT w) where
return (a, mempty)
{-# INLINE lift #-}

instance (Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) where
instance (Monoid w, MonadIO m) => MonadIO (AccumT w m) where
liftIO = lift . liftIO
{-# INLINE liftIO #-}

Expand Down
1 change: 0 additions & 1 deletion Control/Monad/Trans/Cont.hs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ import Control.Monad.IO.Class
import Control.Monad.Trans.Class
import Data.Functor.Identity

import Control.Applicative
import qualified Control.Monad.Fail as Fail
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
Expand Down
5 changes: 2 additions & 3 deletions Control/Monad/Trans/Except.hs
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,8 @@
import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Control.Monad.Zip (MonadZip(mzipWith))
import Data.Foldable (Foldable(foldMap))

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 62 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Foldable’ is redundant
import Data.Monoid (Monoid(mempty, mappend))
import Data.Traversable (Traversable(traverse))

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 63 in Control/Monad/Trans/Except.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Traversable’ is redundant
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down Expand Up @@ -183,7 +182,7 @@
ExceptT <$> traverse (either (pure . Left) (fmap Right . f)) a
{-# INLINE traverse #-}

instance (Functor m, Monad m) => Applicative (ExceptT e m) where
instance (Monad m) => Applicative (ExceptT e m) where
pure a = ExceptT $ return (Right a)
{-# INLINE pure #-}
ExceptT f <*> ExceptT v = ExceptT $ do
Expand All @@ -199,7 +198,7 @@
m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}

instance (Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) where
instance (Monad m, Monoid e) => Alternative (ExceptT e m) where
empty = ExceptT $ return (Left mempty)
{-# INLINE empty #-}
ExceptT mx <|> ExceptT my = ExceptT $ do
Expand Down
4 changes: 2 additions & 2 deletions Control/Monad/Trans/Maybe.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
import Control.Monad.Fix (MonadFix(mfix))
import Control.Monad.Zip (MonadZip(mzipWith))
import Data.Maybe (fromMaybe)
import Data.Foldable (Foldable(foldMap))

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Foldable’ is redundant

Check warning on line 53 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Foldable’ is redundant
import Data.Traversable (Traversable(traverse))

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 54 in Control/Monad/Trans/Maybe.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Traversable’ is redundant
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down Expand Up @@ -131,7 +131,7 @@
traverse f (MaybeT a) = MaybeT <$> traverse (traverse f) a
{-# INLINE traverse #-}

instance (Functor m, Monad m) => Applicative (MaybeT m) where
instance (Monad m) => Applicative (MaybeT m) where
pure = MaybeT . return . Just
{-# INLINE pure #-}
mf <*> mx = MaybeT $ do
Expand All @@ -147,7 +147,7 @@
m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}

instance (Functor m, Monad m) => Alternative (MaybeT m) where
instance (Monad m) => Alternative (MaybeT m) where
empty = MaybeT (return Nothing)
{-# INLINE empty #-}
x <|> y = MaybeT $ do
Expand Down
8 changes: 3 additions & 5 deletions Control/Monad/Trans/RWS/CPS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,6 @@ import Control.Monad.Trans.Class
import Control.Monad.Signatures
import Data.Functor.Identity

import Data.Monoid

import qualified Control.Monad.Fail as Fail
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
Expand Down Expand Up @@ -205,7 +203,7 @@ instance (Functor m) => Functor (RWST r w s m) where
fmap f m = RWST $ \ r s w -> (\ (a, s', w') -> (f a, s', w')) <$> unRWST m r s w
{-# INLINE fmap #-}

instance (Functor m, Monad m) => Applicative (RWST r w s m) where
instance (Monad m) => Applicative (RWST r w s m) where
pure a = RWST $ \ _ s w -> return (a, s, w)
{-# INLINE pure #-}

Expand All @@ -215,7 +213,7 @@ instance (Functor m, Monad m) => Applicative (RWST r w s m) where
return (f x, s'', w'')
{-# INLINE (<*>) #-}

instance (Functor m, MonadPlus m) => Alternative (RWST r w s m) where
instance (MonadPlus m) => Alternative (RWST r w s m) where
empty = RWST $ \ _ _ _ -> mzero
{-# INLINE empty #-}

Expand All @@ -233,7 +231,7 @@ instance (Fail.MonadFail m) => Fail.MonadFail (RWST r w s m) where
fail msg = RWST $ \ _ _ _ -> Fail.fail msg
{-# INLINE fail #-}

instance (Functor m, MonadPlus m) => MonadPlus (RWST r w s m) where
instance (MonadPlus m) => MonadPlus (RWST r w s m) where
mzero = empty
{-# INLINE mzero #-}
mplus = (<|>)
Expand Down
5 changes: 2 additions & 3 deletions Control/Monad/Trans/RWS/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ import Control.Applicative
import Control.Monad
import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Data.Monoid
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down Expand Up @@ -179,7 +178,7 @@ instance (Functor m) => Functor (RWST r w s m) where
fmap (\ ~(a, s', w) -> (f a, s', w)) $ runRWST m r s
{-# INLINE fmap #-}

instance (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) where
instance (Monoid w, Monad m) => Applicative (RWST r w s m) where
pure a = RWST $ \ _ s -> return (a, s, mempty)
{-# INLINE pure #-}
RWST mf <*> RWST mx = RWST $ \ r s -> do
Expand All @@ -188,7 +187,7 @@ instance (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) where
return (f x, s'', w `mappend` w')
{-# INLINE (<*>) #-}

instance (Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) where
instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
empty = RWST $ \ _ _ -> mzero
{-# INLINE empty #-}
RWST m <|> RWST n = RWST $ \ r s -> m r s `mplus` n r s
Expand Down
5 changes: 2 additions & 3 deletions Control/Monad/Trans/RWS/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ import Control.Applicative
import Control.Monad
import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Data.Monoid
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down Expand Up @@ -183,7 +182,7 @@ instance (Functor m) => Functor (RWST r w s m) where
fmap (\ (a, s', w) -> (f a, s', w)) $ runRWST m r s
{-# INLINE fmap #-}

instance (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) where
instance (Monoid w, Monad m) => Applicative (RWST r w s m) where
pure a = RWST $ \ _ s -> return (a, s, mempty)
{-# INLINE pure #-}
RWST mf <*> RWST mx = RWST $ \ r s -> do
Expand All @@ -192,7 +191,7 @@ instance (Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) where
return (f x, s'', w `mappend` w')
{-# INLINE (<*>) #-}

instance (Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) where
instance (Monoid w, MonadPlus m) => Alternative (RWST r w s m) where
empty = RWST $ \ _ _ -> mzero
{-# INLINE empty #-}
RWST m <|> RWST n = RWST $ \ r s -> m r s `mplus` n r s
Expand Down
1 change: 0 additions & 1 deletion Control/Monad/Trans/Reader.hs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ import Control.Monad
import qualified Control.Monad.Fail as Fail
import Control.Monad.Fix
import Control.Monad.Zip (MonadZip(mzipWith))
import Data.Functor ((<$))
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down
4 changes: 2 additions & 2 deletions Control/Monad/Trans/Select.hs
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ instance (Functor m) => Functor (SelectT r m) where
fmap f (SelectT g) = SelectT (fmap f . g . (. f))
{-# INLINE fmap #-}

instance (Functor m, Monad m) => Applicative (SelectT r m) where
instance (Monad m) => Applicative (SelectT r m) where
pure = lift . return
{-# INLINE pure #-}
SelectT gf <*> SelectT gx = SelectT $ \ k -> do
Expand All @@ -108,7 +108,7 @@ instance (Functor m, Monad m) => Applicative (SelectT r m) where
m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}

instance (Functor m, MonadPlus m) => Alternative (SelectT r m) where
instance (MonadPlus m) => Alternative (SelectT r m) where
empty = mzero
{-# INLINE empty #-}
(<|>) = mplus
Expand Down
4 changes: 2 additions & 2 deletions Control/Monad/Trans/State/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ instance (Functor m) => Functor (StateT s m) where
fmap (\ ~(a, s') -> (f a, s')) $ runStateT m s
{-# INLINE fmap #-}

instance (Functor m, Monad m) => Applicative (StateT s m) where
instance (Monad m) => Applicative (StateT s m) where
pure a = StateT $ \ s -> return (a, s)
{-# INLINE pure #-}
StateT mf <*> StateT mx = StateT $ \ s -> do
Expand All @@ -215,7 +215,7 @@ instance (Functor m, Monad m) => Applicative (StateT s m) where
m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}

instance (Functor m, MonadPlus m) => Alternative (StateT s m) where
instance (MonadPlus m) => Alternative (StateT s m) where
empty = StateT $ \ _ -> mzero
{-# INLINE empty #-}
StateT m <|> StateT n = StateT $ \ s -> m s `mplus` n s
Expand Down
4 changes: 2 additions & 2 deletions Control/Monad/Trans/State/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ instance (Functor m) => Functor (StateT s m) where
fmap (\ (a, s') -> (f a, s')) $ runStateT m s
{-# INLINE fmap #-}

instance (Functor m, Monad m) => Applicative (StateT s m) where
instance (Monad m) => Applicative (StateT s m) where
pure a = StateT $ \ s -> return (a, s)
{-# INLINE pure #-}
StateT mf <*> StateT mx = StateT $ \ s -> do
Expand All @@ -208,7 +208,7 @@ instance (Functor m, Monad m) => Applicative (StateT s m) where
m *> k = m >>= \_ -> k
{-# INLINE (*>) #-}

instance (Functor m, MonadPlus m) => Alternative (StateT s m) where
instance (MonadPlus m) => Alternative (StateT s m) where
empty = StateT $ \ _ -> mzero
{-# INLINE empty #-}
StateT m <|> StateT n = StateT $ \ s -> m s `mplus` n s
Expand Down
8 changes: 3 additions & 5 deletions Control/Monad/Trans/Writer/CPS.hs
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ import Control.Monad.Trans.Class
import Control.Monad.Signatures
import Data.Functor.Identity

import Data.Monoid

import qualified Control.Monad.Fail as Fail
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
Expand Down Expand Up @@ -160,7 +158,7 @@ instance (Functor m) => Functor (WriterT w m) where
fmap f m = WriterT $ \ w -> (\ (a, w') -> (f a, w')) <$> unWriterT m w
{-# INLINE fmap #-}

instance (Functor m, Monad m) => Applicative (WriterT w m) where
instance (Monad m) => Applicative (WriterT w m) where
pure a = WriterT $ \ w -> return (a, w)
{-# INLINE pure #-}

Expand All @@ -170,7 +168,7 @@ instance (Functor m, Monad m) => Applicative (WriterT w m) where
return (f x, w'')
{-# INLINE (<*>) #-}

instance (Functor m, MonadPlus m) => Alternative (WriterT w m) where
instance (MonadPlus m) => Alternative (WriterT w m) where
empty = WriterT $ const mzero
{-# INLINE empty #-}

Expand All @@ -188,7 +186,7 @@ instance (Fail.MonadFail m) => Fail.MonadFail (WriterT w m) where
fail msg = WriterT $ \ _ -> Fail.fail msg
{-# INLINE fail #-}

instance (Functor m, MonadPlus m) => MonadPlus (WriterT w m) where
instance (MonadPlus m) => MonadPlus (WriterT w m) where
mzero = empty
{-# INLINE mzero #-}
mplus = (<|>)
Expand Down
1 change: 0 additions & 1 deletion Control/Monad/Trans/Writer/Lazy.hs
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@
import Control.Monad.Signatures
import Control.Monad.Zip (MonadZip(mzipWith))
import Data.Foldable
import Data.Monoid
import Data.Traversable (Traversable(traverse))

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 61 in Control/Monad/Trans/Writer/Lazy.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Traversable’ is redundant
import Prelude hiding (null, length)
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
Expand Down
1 change: 0 additions & 1 deletion Control/Monad/Trans/Writer/Strict.hs
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@
import Control.Monad.Signatures
import Control.Monad.Zip (MonadZip(mzipWith))
import Data.Foldable
import Data.Monoid
import Data.Traversable (Traversable(traverse))

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on ubuntu-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 8.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.2 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.8 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.10 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on windows-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.12 on macos-latest

The import of ‘Data.Traversable’ is redundant

Check warning on line 64 in Control/Monad/Trans/Writer/Strict.hs

View workflow job for this annotation

GitHub Actions / GHC 9.14 on macos-latest

The import of ‘Data.Traversable’ is redundant
import Prelude hiding (null, length)
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
Expand Down
3 changes: 0 additions & 3 deletions Data/Functor/Constant.hs
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,7 @@ import Data.Functor.Contravariant

import Control.Applicative
import Data.Foldable
import Data.Monoid (Monoid(..))
import Data.Traversable (Traversable(traverse))
import Data.Bifunctor (Bifunctor(..))
import Data.Semigroup (Semigroup((<>)))
import Data.Bifoldable (Bifoldable(..))
import Data.Bitraversable (Bitraversable(..))
import Prelude hiding (null, length)
Expand Down
2 changes: 1 addition & 1 deletion Data/Functor/Reverse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ import Control.Monad
import qualified Control.Monad.Fail as Fail
import Data.Foldable
import Data.Traversable (Traversable(traverse))
import Data.Monoid
import Data.Monoid (Dual (..))
#ifdef __GLASGOW_HASKELL__
import GHC.Generics
#endif
Expand Down
2 changes: 0 additions & 2 deletions Setup.hs

This file was deleted.

6 changes: 6 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

packages: .

program-options
ghc-options:
-Wall -Wredundant-constraints -Werror -Wwarn=unused-imports
Loading
Loading