{-# LANGUAGE CPP #-}
{-# LANGUAGE Trustworthy #-}
module Universum.Monad.Reexport
(
module Control.Monad.Except
, module Control.Monad.Reader
, module Control.Monad.State.Strict
, module Control.Monad.Trans
, module Control.Monad.Trans.Identity
, module Control.Monad.Trans.Maybe
, module Data.Maybe
, module Data.Either
, Monad ((>>=), (>>), return)
, MonadFail (fail)
, MonadPlus (..)
, (=<<)
, (>=>)
, (<=<)
, forever
, join
, mfilter
, filterM
, mapAndUnzipM
, zipWithM
, zipWithM_
, foldM
, foldM_
, replicateM
, replicateM_
, liftM2
, liftM3
, liftM4
, liftM5
, ap
, (<$!>)
) where
import Control.Monad.Except (ExceptT (..), runExceptT)
import Control.Monad.Reader (MonadReader, Reader, ReaderT (..), ask, asks, local, reader, runReader)
import Control.Monad.State.Strict (MonadState, State, StateT (..), evalState, evalStateT, execState,
execStateT, get, gets, modify, modify', put, runState, state,
withState)
import Control.Monad.Trans (MonadIO, MonadTrans, lift, liftIO)
import Control.Monad.Trans.Identity (IdentityT (runIdentityT))
import Control.Monad.Trans.Maybe (MaybeT (..), exceptToMaybeT, maybeToExceptT)
import Data.Maybe (Maybe (..), catMaybes, fromMaybe, isJust, isNothing, listToMaybe, mapMaybe,
maybe, maybeToList)
import Data.Either (Either (..), either, isLeft, isRight, lefts, partitionEithers, rights)
import Control.Monad hiding (fail)
#if __GLASGOW_HASKELL__ >= 800
import Control.Monad.Fail (MonadFail (..))
#else
import Prelude (String)
import Text.ParserCombinators.ReadP (ReadP)
import Text.ParserCombinators.ReadPrec (ReadPrec)
import Universum.Base (IO)
import qualified Prelude as P (fail)
class Monad m => MonadFail m where
fail :: String -> m a
instance MonadFail Maybe where
fail _ = Nothing
instance MonadFail [] where
fail _ = []
instance MonadFail IO where
fail = P.fail
instance MonadFail ReadPrec where
fail = P.fail
instance MonadFail ReadP where
fail = P.fail
#endif