Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- newtype Artist = Artist String
- newtype ConfigPath = ConfigPath FilePath
- newtype CopySwitch = CopySwitch Bool
- newtype DestPath = DestPath FilePath
- data Links
- newtype MoveSwitch = MoveSwitch Bool
- newtype NoActionSwitch = NoActionSwitch Bool
- newtype NoDirsSwitch = NoDirsSwitch Bool
- newtype ParentDir = ParentDir FilePath
- data Options = Options {}
- type Ph a = ReaderT Options (ExceptT String IO) a
- newtype Prefix = Prefix String
- newtype SrcPath = SrcPath FilePath
- newtype Suffix = Suffix String
- data Verbosity
- readVerbosity :: String -> Either String Verbosity
- runRename :: Options -> Ph a -> IO (Either String a)
- class Monad m => MonadError e (m :: Type -> Type) | m -> e
- ask :: MonadReader r m => m r
- asks :: MonadReader r m => (r -> a) -> m a
- liftIO :: MonadIO m => IO a -> m a
- throwError :: MonadError e m => e -> m a
Documentation
newtype ConfigPath Source #
newtype CopySwitch Source #
Instances
Generic CopySwitch Source # | |
Defined in Photoname.Common type Rep CopySwitch :: Type -> Type # from :: CopySwitch -> Rep CopySwitch x # to :: Rep CopySwitch x -> CopySwitch # | |
Newtype CopySwitch Source # | |
Defined in Photoname.Common type O CopySwitch # pack :: O CopySwitch -> CopySwitch # unpack :: CopySwitch -> O CopySwitch # | |
type Rep CopySwitch Source # | |
Defined in Photoname.Common type Rep CopySwitch = D1 ('MetaData "CopySwitch" "Photoname.Common" "photoname-5.1-EjQUsg3myJgHw35JYZwQoB" 'True) (C1 ('MetaCons "CopySwitch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) | |
type O CopySwitch Source # | |
Defined in Photoname.Common |
newtype MoveSwitch Source #
Instances
Generic MoveSwitch Source # | |
Defined in Photoname.Common type Rep MoveSwitch :: Type -> Type # from :: MoveSwitch -> Rep MoveSwitch x # to :: Rep MoveSwitch x -> MoveSwitch # | |
Newtype MoveSwitch Source # | |
Defined in Photoname.Common type O MoveSwitch # pack :: O MoveSwitch -> MoveSwitch # unpack :: MoveSwitch -> O MoveSwitch # | |
type Rep MoveSwitch Source # | |
Defined in Photoname.Common type Rep MoveSwitch = D1 ('MetaData "MoveSwitch" "Photoname.Common" "photoname-5.1-EjQUsg3myJgHw35JYZwQoB" 'True) (C1 ('MetaCons "MoveSwitch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) | |
type O MoveSwitch Source # | |
Defined in Photoname.Common |
newtype NoActionSwitch Source #
Instances
Generic NoActionSwitch Source # | |
Defined in Photoname.Common type Rep NoActionSwitch :: Type -> Type # from :: NoActionSwitch -> Rep NoActionSwitch x # to :: Rep NoActionSwitch x -> NoActionSwitch # | |
Newtype NoActionSwitch Source # | |
Defined in Photoname.Common type O NoActionSwitch # pack :: O NoActionSwitch -> NoActionSwitch # unpack :: NoActionSwitch -> O NoActionSwitch # | |
type Rep NoActionSwitch Source # | |
Defined in Photoname.Common type Rep NoActionSwitch = D1 ('MetaData "NoActionSwitch" "Photoname.Common" "photoname-5.1-EjQUsg3myJgHw35JYZwQoB" 'True) (C1 ('MetaCons "NoActionSwitch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) | |
type O NoActionSwitch Source # | |
Defined in Photoname.Common |
newtype NoDirsSwitch Source #
Instances
Generic NoDirsSwitch Source # | |
Defined in Photoname.Common type Rep NoDirsSwitch :: Type -> Type # from :: NoDirsSwitch -> Rep NoDirsSwitch x # to :: Rep NoDirsSwitch x -> NoDirsSwitch # | |
Newtype NoDirsSwitch Source # | |
Defined in Photoname.Common type O NoDirsSwitch # pack :: O NoDirsSwitch -> NoDirsSwitch # unpack :: NoDirsSwitch -> O NoDirsSwitch # | |
type Rep NoDirsSwitch Source # | |
Defined in Photoname.Common type Rep NoDirsSwitch = D1 ('MetaData "NoDirsSwitch" "Photoname.Common" "photoname-5.1-EjQUsg3myJgHw35JYZwQoB" 'True) (C1 ('MetaCons "NoDirsSwitch" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool))) | |
type O NoDirsSwitch Source # | |
Defined in Photoname.Common |
Options | |
|
class Monad m => MonadError e (m :: Type -> Type) | m -> e #
The strategy of combining computations that can throw exceptions by bypassing bound functions from the point an exception is thrown to the point that it is handled.
Is parameterized over the type of error information and
the monad type constructor.
It is common to use
as the monad type constructor
for an error monad in which error descriptions take the form of strings.
In that case and many other common cases the resulting monad is already defined
as an instance of the Either
StringMonadError
class.
You can also define your own error type and/or use a monad type constructor
other than
or Either
String
.
In these cases you will have to explicitly define instances of the Either
IOError
MonadError
class.
(If you are using the deprecated Control.Monad.Error or
Control.Monad.Trans.Error, you may also have to define an Error
instance.)
Instances
ask :: MonadReader r m => m r #
Retrieves the monad environment.
:: MonadReader r m | |
=> (r -> a) | The selector function to apply to the environment. |
-> m a |
Retrieves a function of the current environment.
throwError :: MonadError e m => e -> m a #
Is used within a monadic computation to begin exception processing.