-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Declarative command line option parser -- -- Declarative and easy to use command line option parser @package optparse-declarative @version 0.4.2 -- | Declarative options parser module Options.Declarative -- | Command class class IsCmd c -- | Command data Cmd (help :: Symbol) a -- | Output string when the verbosity level is greater than or equal to -- logLevel logStr :: Int -> String -> Cmd help () -- | Return the verbosity level ('--verbosity=n') getVerbosity :: Cmd help Int -- | Retrieve the logger function getLogger :: MonadIO m => Cmd a (Int -> String -> m ()) -- | Command line option class Option a where { -- | Type of the argument' value type family Value a :: *; } -- | Get the argument' value get :: Option a => a -> Value a -- | Named argument data Flag (shortNames :: Symbol) (longNames :: [Symbol]) (placeholder :: Symbol) (help :: Symbol) a -- | Unnamed argument data Arg (placeholder :: Symbol) a -- | Command line option's annotated types class ArgRead a where { -- | Type of the argument type family Unwrap a :: *; type Unwrap a = a; } -- | Get the argument's value unwrap :: ArgRead a => a -> Unwrap a -- | Get the argument's value unwrap :: (ArgRead a, a ~ Unwrap a) => a -> Unwrap a -- | Argument parser argRead :: ArgRead a => [String] -> Maybe a -- | Argument parser argRead :: (ArgRead a, Read a) => [String] -> Maybe a -- | Indicate this argument is mandatory needArg :: ArgRead a => Proxy a -> Bool -- | The argument which has default value data Def (defaultValue :: Symbol) a -- | Command group data Group Group :: String -> [SubCmd] -> Group [groupHelp] :: Group -> String [groupCmds] :: Group -> [SubCmd] -- | Sub command data SubCmd -- | Make a sub command subCmd :: IsCmd c => String -> c -> SubCmd -- | Run a command with specifying program name and version run :: IsCmd c => String -> Maybe String -> c -> IO () -- | Run a command run_ :: IsCmd c => c -> IO () instance Control.Monad.Catch.MonadCatch (Options.Declarative.Cmd help) instance Control.Monad.Catch.MonadThrow (Options.Declarative.Cmd help) instance Control.Monad.Fail.MonadFail (Options.Declarative.Cmd help) instance GHC.Base.MonadPlus (Options.Declarative.Cmd help) instance Control.Monad.Fix.MonadFix (Options.Declarative.Cmd help) instance Control.Monad.IO.Class.MonadIO (Options.Declarative.Cmd help) instance GHC.Base.Monad (Options.Declarative.Cmd help) instance GHC.Base.Alternative (Options.Declarative.Cmd help) instance GHC.Base.Applicative (Options.Declarative.Cmd help) instance GHC.Base.Functor (Options.Declarative.Cmd help) instance Options.Declarative.KnownSymbols '[] instance (GHC.TypeLits.KnownSymbol s, Options.Declarative.KnownSymbols ss) => Options.Declarative.KnownSymbols (s : ss) instance (GHC.TypeLits.KnownSymbol shortNames, Options.Declarative.KnownSymbols longNames, GHC.TypeLits.KnownSymbol placeholder, GHC.TypeLits.KnownSymbol help, Options.Declarative.ArgRead a, Options.Declarative.IsCmd c) => Options.Declarative.IsCmd (Options.Declarative.Flag shortNames longNames placeholder help a -> c) instance Options.Declarative.IsCmd Options.Declarative.Group instance (GHC.TypeLits.KnownSymbol placeholder, Options.Declarative.ArgRead a, Options.Declarative.IsCmd c) => Options.Declarative.IsCmd (Options.Declarative.Arg placeholder a -> c) instance (GHC.TypeLits.KnownSymbol placeholder, Options.Declarative.IsCmd c) => Options.Declarative.IsCmd (Options.Declarative.Arg placeholder GHC.Base.String -> c) instance (GHC.TypeLits.KnownSymbol placeholder, Options.Declarative.ArgRead a, Options.Declarative.IsCmd c) => Options.Declarative.IsCmd (Options.Declarative.Arg placeholder [a] -> c) instance GHC.TypeLits.KnownSymbol help => Options.Declarative.IsCmd (Options.Declarative.Cmd help ()) instance (GHC.TypeLits.KnownSymbol defaultValue, Options.Declarative.ArgRead a) => Options.Declarative.ArgRead (Options.Declarative.Def defaultValue a) instance Options.Declarative.ArgRead a => Options.Declarative.Option (Options.Declarative.Flag _a _b _c _d a) instance Options.Declarative.ArgRead GHC.Types.Int instance Options.Declarative.ArgRead GHC.Integer.Type.Integer instance Options.Declarative.ArgRead GHC.Types.Double instance Options.Declarative.ArgRead GHC.Base.String instance Options.Declarative.ArgRead GHC.Types.Bool instance Options.Declarative.ArgRead a => Options.Declarative.ArgRead (GHC.Maybe.Maybe a) instance Options.Declarative.ArgRead a => Options.Declarative.ArgRead [a] instance Options.Declarative.Option (Options.Declarative.Arg _a a)