-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Simple command args parsing and execution
--   
--   This is a small wrapper over optparse-applicative which allows
--   combining args parsers directly with IO commands. For subcommands this
--   can avoid type boilerplate. It also provides some compact aliases for
--   options with their Mod's.
@package simple-cmd-args
@version 0.1.8


-- | This library provides a thin layer on optparse-applicative argument
--   and option parsing, using <tt>Parser (IO ())</tt>, applying commands
--   directly to their argument parsing.
--   
--   Some option Mod functions are also provided.
module SimpleCmdArgs

-- | Parser executor (allows interspersed args and options)
--   
--   <pre>
--   simpleCmdArgs (Just version) "summary" "program description" $ myCommand &lt;$&gt; myOptParser &lt;*&gt; myargsParser
--   </pre>
simpleCmdArgs :: Maybe Version -> String -> String -> Parser (IO ()) -> IO ()

-- | Parser executor without interspersing options and args
--   
--   <pre>
--   simpleCmdArgs' Nothing "summary" "program description" $ myCommand &lt;$&gt; myOptParser &lt;*&gt; myargsParser
--   </pre>
simpleCmdArgs' :: Maybe Version -> String -> String -> Parser (IO ()) -> IO ()

-- | Generic parser executor with explicit info modifiers
simpleCmdArgsWithMods :: Maybe Version -> InfoMod (IO ()) -> Parser (IO ()) -> IO ()

-- | <pre>
--   Subcommand "command" "help description text" $ myCommand &lt;$&gt; optParser
--   </pre>
data Subcommand
Subcommand :: String -> String -> Parser (IO ()) -> Subcommand

-- | Create a list of <tt>Subcommand</tt> that can be run by
--   <tt>simpleCmdArgs</tt>
subcommands :: [Subcommand] -> Parser (IO ())

-- | A string arg parser with a METAVAR for help
strArg :: String -> Parser String

-- | switch with Mods
--   
--   <pre>
--   switchWith 'o' "option" "help description"
--   </pre>
switchWith :: Char -> String -> String -> Parser Bool

-- | switchWith with only long option
--   
--   <pre>
--   switchLongWith "option" "help description"
--   </pre>
switchLongWith :: String -> String -> Parser Bool

-- | flag with Mods
--   
--   <pre>
--   flagWith offVal onVal 'f' "flag" "help description"
--   </pre>
flagWith :: a -> a -> Char -> String -> String -> Parser a

-- | flag' with Mods
--   
--   <pre>
--   flagWith' val 'f' "flag" "help description"
--   </pre>
flagWith' :: a -> Char -> String -> String -> Parser a

-- | flagWith with only long option
--   
--   <pre>
--   flagLongWith offVal onVal "flag" "help description"
--   </pre>
flagLongWith :: a -> a -> String -> String -> Parser a

-- | flagWith' with only long option
--   
--   <pre>
--   flagLongWith' val "flag" "help description"
--   </pre>
flagLongWith' :: a -> String -> String -> Parser a

-- | <tt>Mod</tt>s for a switch.
--   
--   <pre>
--   switchMods 'o' "option" "help description"
--   </pre>
switchMods :: HasName f => Char -> String -> String -> Mod f a

-- | <tt>Mod</tt>s for a switch.
--   
--   <pre>
--   switchLongMods "option" "help description"
--   </pre>
switchLongMods :: HasName f => String -> String -> Mod f a

-- | strOption with Mods
--   
--   <pre>
--   strOptionWith 'o' "option" "METAVAR" "help description"
--   </pre>
strOptionWith :: Char -> String -> String -> String -> Parser String

-- | strOptionWith with only long option
--   
--   <pre>
--   strOptionLongWith "option" "METAVAR" "help description"
--   </pre>
strOptionLongWith :: String -> String -> String -> Parser String

-- | option with Mods
--   
--   <pre>
--   optionWith auto 'o' "option" "METAVAR" "help description"
--   </pre>
optionWith :: ReadM a -> Char -> String -> String -> String -> Parser a

-- | optionWith with only long option
--   
--   <pre>
--   optionLongWith auto "option" "METAVAR" "help description"
--   </pre>
optionLongWith :: ReadM a -> String -> String -> String -> Parser a

-- | <tt>Mod</tt>s for a mandatory option.
--   
--   <pre>
--   optionMods 'o' "option" "METAVAR" "help description"
--   </pre>
optionMods :: (HasMetavar f, HasName f) => Char -> String -> String -> String -> Mod f a

-- | optionMods with only long option
--   
--   <pre>
--   optionLongMods "option" "METAVAR" "help description"
--   </pre>
optionLongMods :: (HasMetavar f, HasName f) => String -> String -> String -> Mod f a

-- | strOptional with Mods
--   
--   <pre>
--   strOptionalWith 'o' "option" "METAVAR" "help description" default
--   </pre>
strOptionalWith :: Char -> String -> String -> String -> String -> Parser String

-- | strOptionalWith with only long option
--   
--   <pre>
--   strOptionalLongWith "option" "METAVAR" "help description" default
--   </pre>
strOptionalLongWith :: String -> String -> String -> String -> Parser String

-- | optional option with Mods, includes a default value.
--   
--   <pre>
--   optionalWith auto 'o' "option" "METAVAR" "help description" default
--   </pre>
optionalWith :: ReadM a -> Char -> String -> String -> String -> a -> Parser a

-- | optionalWith with only long option
--   
--   <pre>
--   optionalLongWith auto "option" "METAVAR" "help description" default
--   </pre>
optionalLongWith :: ReadM a -> String -> String -> String -> a -> Parser a

-- | <tt>Mod</tt>s for an optional option: includes a default value.
--   
--   <pre>
--   optionalMods 'o' "option" "METAVAR" "help description" default
--   </pre>
optionalMods :: (HasMetavar f, HasName f, HasValue f) => Char -> String -> String -> String -> a -> Mod f a

-- | optionalMods with only long option
--   
--   <pre>
--   optionalLongMods "option" "METAVAR" "help description" default
--   </pre>
optionalLongMods :: (HasMetavar f, HasName f, HasValue f) => String -> String -> String -> a -> Mod f a

-- | argument with METAVAR
--   
--   <pre>
--   argumentWith auto "METAVAR"
--   </pre>
argumentWith :: ReadM a -> String -> Parser a
data Parser a
data ReadM a
auto :: Read a => ReadM a
many :: Alternative f => f a -> f [a]
eitherReader :: (String -> Either String a) -> ReadM a
maybeReader :: (String -> Maybe a) -> ReadM a
optional :: Alternative f => f a -> f (Maybe a)
some :: Alternative f => f a -> f [a]
str :: IsString s => ReadM s
(<|>) :: Alternative f => f a -> f a -> f a
instance GHC.Classes.Eq SimpleCmdArgs.Subcommand
instance GHC.Classes.Ord SimpleCmdArgs.Subcommand
