symantic-cli-2.3.3.20190711: Symantics for parsing and documenting a CLI

Safe HaskellNone
LanguageHaskell2010

Symantic.CLI.Help

Contents

Synopsis

Type Help

data Help d f k Source #

Constructors

Help 

Fields

Instances
SchemaDoc d => CLI_Help (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type HelpConstraint (Help d) d :: Constraint Source #

Methods

help :: HelpConstraint (Help d) d0 => d0 -> Help d f k -> Help d f k Source #

program :: Name -> Help d f k -> Help d f k Source #

rule :: Name -> Help d f k -> Help d f k Source #

SchemaDoc d => CLI_Response (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type ResponseConstraint (Help d) a :: Constraint Source #

type ResponseArgs (Help d) a :: Type Source #

type Response (Help d) :: Type Source #

SchemaDoc d => CLI_Tag (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type TagConstraint (Help d) a :: Constraint Source #

Methods

tagged :: Tag -> Help d f k -> Help d f k Source #

endOpts :: Help d k k Source #

short :: TagConstraint (Help d) a => Char -> Help d (a -> k) k -> Permutation (Help d) k a Source #

long :: TagConstraint (Help d) a => Name -> Help d (a -> k) k -> Permutation (Help d) k a Source #

option :: TagConstraint (Help d) a => a -> Help d (a -> k) k -> Permutation (Help d) k a Source #

flag :: TagConstraint (Help d) Bool => Tag -> Permutation (Help d) k Bool Source #

shortOpt :: TagConstraint (Help d) a => Char -> a -> Help d (a -> k) k -> Permutation (Help d) k a Source #

longOpt :: TagConstraint (Help d) a => Name -> a -> Help d (a -> k) k -> Permutation (Help d) k a Source #

SchemaDoc d => CLI_Env (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type EnvConstraint (Help d) a :: Constraint Source #

Methods

env' :: EnvConstraint (Help d) a => Name -> Help d (a -> k) k Source #

SchemaDoc d => CLI_Var (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type VarConstraint (Help d) a :: Constraint Source #

Methods

var' :: VarConstraint (Help d) a => Name -> Help d (a -> k) k Source #

just :: a -> Help d (a -> k) k Source #

nothing :: Help d k k Source #

SchemaDoc d => CLI_Command (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

command :: Name -> Help d a k -> Help d a k Source #

SchemaDoc d => Permutable (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type Permutation (Help d) = (r :: Type -> Type -> Type) Source #

Methods

runPermutation :: Permutation (Help d) k a -> Help d (a -> k) k Source #

toPermutation :: Help d (a -> k) k -> Permutation (Help d) k a Source #

toPermDefault :: a -> Help d (a -> k) k -> Permutation (Help d) k a Source #

SchemaDoc d => AltApp (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

many0 :: Help d (a -> k) k -> Help d ([a] -> k) k Source #

many1 :: Help d (a -> k) k -> Help d ([a] -> k) k Source #

Pro (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

dimap :: (a -> b) -> (b -> a) -> Help d (a -> k) k -> Help d (b -> k) k Source #

SchemaDoc d => Alt (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

(<!>) :: Help d a k -> Help d b k -> Help d (a :!: b) k Source #

alt :: Help d a k -> Help d a k -> Help d a k Source #

opt :: Help d (a -> k) k -> Help d (Maybe a -> k) k Source #

SchemaDoc d => App (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

(<.>) :: Help d a b -> Help d b c -> Help d a c Source #

Semigroup d => Semigroup (Help d f k) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

(<>) :: Help d f k -> Help d f k -> Help d f k #

sconcat :: NonEmpty (Help d f k) -> Help d f k #

stimes :: Integral b => b -> Help d f k -> Help d f k #

Monoid d => Monoid (Help d f k) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

mempty :: Help d f k #

mappend :: Help d f k -> Help d f k -> Help d f k #

mconcat :: [Help d f k] -> Help d f k #

type Response (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

type Response (Help d) = ()
type Permutation (Help d) Source # 
Instance details

Defined in Symantic.CLI.Help

type HelpConstraint (Help d) d' Source # 
Instance details

Defined in Symantic.CLI.Help

type HelpConstraint (Help d) d' = d ~ d'
type ResponseConstraint (Help d) a Source # 
Instance details

Defined in Symantic.CLI.Help

type ResponseConstraint (Help d) a = ()
type ResponseArgs (Help d) a Source # 
Instance details

Defined in Symantic.CLI.Help

type TagConstraint (Help d) a Source # 
Instance details

Defined in Symantic.CLI.Help

type TagConstraint (Help d) a = ()
type EnvConstraint (Help d) a Source # 
Instance details

Defined in Symantic.CLI.Help

type EnvConstraint (Help d) a = ()
type VarConstraint (Help d) a Source # 
Instance details

Defined in Symantic.CLI.Help

type VarConstraint (Help d) a = ()

runHelp :: SchemaDoc d => HelpInh d -> Help d f k -> d Source #

docHelp :: SchemaDoc d => Indentable d => SchemaDoc d => Help d f k -> d Source #

coerceHelp :: Help d f k -> Help d f' k' Source #

Type HelpInh

data HelpInh d Source #

Configuration inherited top-down.

Constructors

HelpInh 

Fields

Type HelpResult

Type HelpNode

runHelpNodes :: SchemaDoc d => HelpInh d -> Forest (HelpNode, d) -> d Source #

Introduce newline according to the HelpNodes put next to each others.

Type HelpPerm

data HelpPerm d k a Source #

Constructors

HelpPerm (HelpInh d -> HelpResult d) (SchemaPerm d k a) 
Instances
SchemaDoc d => CLI_Help (HelpPerm d) Source # 
Instance details

Defined in Symantic.CLI.Help

Associated Types

type HelpConstraint (HelpPerm d) d :: Constraint Source #

Methods

help :: HelpConstraint (HelpPerm d) d0 => d0 -> HelpPerm d f k -> HelpPerm d f k Source #

program :: Name -> HelpPerm d f k -> HelpPerm d f k Source #

rule :: Name -> HelpPerm d f k -> HelpPerm d f k Source #

Functor (HelpPerm d k) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

fmap :: (a -> b) -> HelpPerm d k a -> HelpPerm d k b #

(<$) :: a -> HelpPerm d k b -> HelpPerm d k a #

Applicative (HelpPerm d k) Source # 
Instance details

Defined in Symantic.CLI.Help

Methods

pure :: a -> HelpPerm d k a #

(<*>) :: HelpPerm d k (a -> b) -> HelpPerm d k a -> HelpPerm d k b #

liftA2 :: (a -> b -> c) -> HelpPerm d k a -> HelpPerm d k b -> HelpPerm d k c #

(*>) :: HelpPerm d k a -> HelpPerm d k b -> HelpPerm d k b #

(<*) :: HelpPerm d k a -> HelpPerm d k b -> HelpPerm d k a #

type HelpConstraint (HelpPerm d) d' Source # 
Instance details

Defined in Symantic.CLI.Help

type HelpConstraint (HelpPerm d) d' = d ~ d'