| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Effects.Optparse
Description
Provides the MonadOptparse typeclass.
Since: 0.1
Synopsis
- class Monad m => MonadOptparse (m :: Type -> Type) where
- execParser :: HasCallStack => ParserInfo a -> m a
- customExecParser :: HasCallStack => ParserPrefs -> ParserInfo a -> m a
- handleParseResult :: HasCallStack => ParserResult a -> m a
- type OsPath = OsString
- osPath :: ReadM OsPath
- validOsPath :: ReadM OsPath
Effect
class Monad m => MonadOptparse (m :: Type -> Type) where Source #
Effects for optparse-applicative.
The vast majority of optparse-applicative is not re-exported, as most of the interface is pure. This is merely the functions needed to run a parser.
Since: 0.1
Methods
execParser :: HasCallStack => ParserInfo a -> m a Source #
Lifted execParser.
Since: 0.1
customExecParser :: HasCallStack => ParserPrefs -> ParserInfo a -> m a Source #
Lifted customExecParser.
Since: 0.1
handleParseResult :: HasCallStack => ParserResult a -> m a Source #
Lifted handleParseResult.
Since: 0.1
Instances
| MonadOptparse IO Source # | Since: 0.1 |
Defined in Effects.Optparse Methods execParser :: HasCallStack => ParserInfo a -> IO a Source # customExecParser :: HasCallStack => ParserPrefs -> ParserInfo a -> IO a Source # handleParseResult :: HasCallStack => ParserResult a -> IO a Source # | |
| MonadOptparse m => MonadOptparse (ReaderT env m) Source # | Since: 0.1 |
Defined in Effects.Optparse Methods execParser :: HasCallStack => ParserInfo a -> ReaderT env m a Source # customExecParser :: HasCallStack => ParserPrefs -> ParserInfo a -> ReaderT env m a Source # handleParseResult :: HasCallStack => ParserResult a -> ReaderT env m a Source # | |
Misc
Type representing filenames/pathnames.
This type doesn't add any guarantees over OsString.