cli-extras-0.1.0.0: Miscellaneous utilities for building and working with command line interfaces

Safe HaskellNone
LanguageHaskell2010

Cli.Extras.SubExcept

Synopsis

Documentation

newtype WrappedPrism' a b Source #

Wrap a Prism' in a newtype to avoid impredicativity problems

Constructors

WrappedPrism' 

Fields

newtype SubExceptT e eSub m a Source #

Constructors

SubExceptT 

Fields

Instances
MonadError e m => MonadError eSub (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

throwError :: eSub -> SubExceptT e eSub m a #

catchError :: SubExceptT e eSub m a -> (eSub -> SubExceptT e eSub m a) -> SubExceptT e eSub m a #

MonadLog o m => MonadLog o (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

logMessageFree :: (forall n. Monoid n => (o -> n) -> n) -> SubExceptT e eSub m () #

MonadTrans (SubExceptT e eSub) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

lift :: Monad m => m a -> SubExceptT e eSub m a #

Monad m => Monad (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

(>>=) :: SubExceptT e eSub m a -> (a -> SubExceptT e eSub m b) -> SubExceptT e eSub m b #

(>>) :: SubExceptT e eSub m a -> SubExceptT e eSub m b -> SubExceptT e eSub m b #

return :: a -> SubExceptT e eSub m a #

fail :: String -> SubExceptT e eSub m a #

Functor m => Functor (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

fmap :: (a -> b) -> SubExceptT e eSub m a -> SubExceptT e eSub m b #

(<$) :: a -> SubExceptT e eSub m b -> SubExceptT e eSub m a #

MonadFail m => MonadFail (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

fail :: String -> SubExceptT e eSub m a #

Applicative m => Applicative (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

pure :: a -> SubExceptT e eSub m a #

(<*>) :: SubExceptT e eSub m (a -> b) -> SubExceptT e eSub m a -> SubExceptT e eSub m b #

liftA2 :: (a -> b -> c) -> SubExceptT e eSub m a -> SubExceptT e eSub m b -> SubExceptT e eSub m c #

(*>) :: SubExceptT e eSub m a -> SubExceptT e eSub m b -> SubExceptT e eSub m b #

(<*) :: SubExceptT e eSub m a -> SubExceptT e eSub m b -> SubExceptT e eSub m a #

MonadIO m => MonadIO (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

liftIO :: IO a -> SubExceptT e eSub m a #

MonadThrow m => MonadThrow (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

throwM :: Exception e0 => e0 -> SubExceptT e eSub m a #

MonadCatch m => MonadCatch (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

catch :: Exception e0 => SubExceptT e eSub m a -> (e0 -> SubExceptT e eSub m a) -> SubExceptT e eSub m a #

MonadMask m => MonadMask (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.SubExcept

Methods

mask :: ((forall a. SubExceptT e eSub m a -> SubExceptT e eSub m a) -> SubExceptT e eSub m b) -> SubExceptT e eSub m b #

uninterruptibleMask :: ((forall a. SubExceptT e eSub m a -> SubExceptT e eSub m a) -> SubExceptT e eSub m b) -> SubExceptT e eSub m b #

generalBracket :: SubExceptT e eSub m a -> (a -> ExitCase b -> SubExceptT e eSub m c) -> (a -> SubExceptT e eSub m b) -> SubExceptT e eSub m (b, c) #

HasCliConfig m => HasCliConfig (SubExceptT e eSub m) Source # 
Instance details

Defined in Cli.Extras.Types

runSubExceptT :: Prism' e eSub -> SubExceptT e eSub m a -> m a Source #