-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Declarative command line option parser -- @package optparse-declarative @version 0.2.0 -- | Declarative options parser module Options.Declarative data Cmd (help :: Symbol) a class IsCmd c where getCmdHelp f = getCmdHelp $ f undefined getOptDescr f = getOptDescr $ f undefined getUsageHeader f = getUsageHeader $ f undefined getUsageFooter f = getUsageFooter $ f undefined class Option a where type family Value a :: * get :: Option a => a -> Value a data Flag (shortNames :: Symbol) (longNames :: [Symbol]) (placeholder :: Symbol) (help :: Symbol) a data Arg (placeholder :: Symbol) a class ArgRead a where type family Unwrap a :: * type instance Unwrap a = a unwrap = id argRead s = readMaybe =<< s needArg _ = True unwrap :: ArgRead a => a -> Unwrap a argRead :: ArgRead a => Maybe String -> Maybe a needArg :: ArgRead a => Proxy a -> Bool data Def (defaultValue :: Symbol) a data Group Group :: String -> [SubCmd] -> Group groupHelp :: Group -> String groupCmds :: Group -> [SubCmd] data SubCmd 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 Functor (Cmd help) instance Applicative (Cmd help) instance Monad (Cmd help) instance MonadIO (Cmd help) instance MonadLogger (Cmd help) instance MonadLoggerIO (Cmd help) instance IsCmd Group instance KnownSymbol help => IsCmd (Cmd help ()) instance (KnownSymbol placeholder, IsCmd c) => IsCmd (Arg placeholder [String] -> c) instance (KnownSymbol placeholder, IsCmd c) => IsCmd (Arg placeholder String -> c) instance (KnownSymbol shortNames, KnownSymbols longNames, KnownSymbol placeholder, KnownSymbol help, ArgRead a, IsCmd c) => IsCmd (Flag shortNames longNames placeholder help a -> c) instance (KnownSymbol s, KnownSymbols ss) => KnownSymbols (s : ss) instance KnownSymbols '[] instance (KnownSymbol defaultValue, ArgRead a) => ArgRead (Def defaultValue a) instance ArgRead a => ArgRead (Maybe a) instance ArgRead Bool instance ArgRead String instance ArgRead Double instance ArgRead Integer instance ArgRead Int instance Option (Arg _a a) instance ArgRead a => Option (Flag _a _b _c _d a)