-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Library for Command Line Interface (CLI) -- -- Symantics for CLI. @package symantic-cli @version 0.0.0.20180410 module Language.Symantic.CLI.Fixity data Fixity Fixity1 :: Unifix -> Fixity Fixity2 :: Infix -> Fixity data Unifix Prefix :: Precedence -> Unifix [unifix_prece] :: Unifix -> Precedence Postfix :: Precedence -> Unifix [unifix_prece] :: Unifix -> Precedence data Infix Infix :: Maybe Associativity -> Precedence -> Infix [infix_assoc] :: Infix -> Maybe Associativity [infix_prece] :: Infix -> Precedence infixL :: Precedence -> Infix infixR :: Precedence -> Infix infixB :: Side -> Precedence -> Infix infixN :: Precedence -> Infix infixN0 :: Infix infixN5 :: Infix -- | Given Precedence and Associativity of its parent -- operator, and the operand Side it is in, return whether an -- Infix operator needs to be enclosed by parenthesis. needsParenInfix :: (Infix, Side) -> Infix -> Bool type Precedence = Int class PrecedenceOf a precedence :: PrecedenceOf a => a -> Precedence data Associativity -- | Associate to the left: a ¹ b ² c == (a ¹ b) ² c AssocL :: Associativity -- | Associate to the right: a ¹ b ² c == a ¹ (b ² c) AssocR :: Associativity -- | Associate to both sides, but to Side when reading. AssocB :: Side -> Associativity data Side -- | Left SideL :: Side -- | Right SideR :: Side instance GHC.Show.Show Language.Symantic.CLI.Fixity.Fixity instance GHC.Classes.Eq Language.Symantic.CLI.Fixity.Fixity instance GHC.Show.Show Language.Symantic.CLI.Fixity.Infix instance GHC.Classes.Eq Language.Symantic.CLI.Fixity.Infix instance GHC.Show.Show Language.Symantic.CLI.Fixity.Associativity instance GHC.Classes.Eq Language.Symantic.CLI.Fixity.Associativity instance GHC.Show.Show Language.Symantic.CLI.Fixity.Side instance GHC.Classes.Eq Language.Symantic.CLI.Fixity.Side instance GHC.Show.Show Language.Symantic.CLI.Fixity.Unifix instance GHC.Classes.Eq Language.Symantic.CLI.Fixity.Unifix instance Language.Symantic.CLI.Fixity.PrecedenceOf Language.Symantic.CLI.Fixity.Fixity instance Language.Symantic.CLI.Fixity.PrecedenceOf Language.Symantic.CLI.Fixity.Infix instance Language.Symantic.CLI.Fixity.PrecedenceOf Language.Symantic.CLI.Fixity.Unifix module Language.Symantic.CLI.Sym -- | Types to type the symantics: eg. to segregate options from commands. data ArgCommand data ArgOption data ArgValue data ArgRule t type Name = String class Sym_Fun repr (<$$>) :: Sym_Fun repr => (a -> b) -> repr e t a -> repr e t b (<$$) :: Sym_Fun repr => a -> repr e t b -> repr e t a ($$>) :: Sym_Fun repr => repr e t b -> a -> repr e t a class Sym_Fun repr => Sym_App repr value :: Sym_App repr => a -> repr e ArgValue a (<**>) :: Sym_App repr => repr e t (a -> b) -> repr e u a -> repr e u b (**>) :: Sym_App repr => repr e t a -> repr e u b -> repr e u b (<**) :: Sym_App repr => repr e t a -> repr e u b -> repr e u a end :: Sym_App repr => repr e t () class Sym_Fun repr => Sym_Alt repr (<||>) :: Sym_Alt repr => repr e t a -> repr e t a -> repr e t a choice :: Sym_Alt repr => [repr e t a] -> repr e t a optional :: Sym_Alt repr => repr e t a -> repr e t (Maybe a) option :: Sym_Alt repr => a -> repr e t a -> repr e t a try :: Sym_Alt repr => repr e t a -> repr e t a class (Sym_Alt repr, Sym_App repr) => Sym_AltApp repr many :: Sym_AltApp repr => repr e t a -> repr e t [a] some :: Sym_AltApp repr => repr e t a -> repr e t [a] intermany :: Sym_AltApp repr => [repr e t a] -> repr e t [a] class Sym_Interleaved repr interleaved :: Sym_Interleaved repr => Perm (repr e t) a -> repr e t a (<<$>>) :: Sym_Interleaved repr => (a -> b) -> repr e t a -> Perm (repr e t) b (<<$?>>) :: Sym_Interleaved repr => (a -> b) -> (a, repr e t a) -> Perm (repr e t) b (<<$*>>) :: Sym_Interleaved repr => ([a] -> b) -> repr e t a -> Perm (repr e t) b (<<|>>) :: Sym_Interleaved repr => Perm (repr e t) (a -> b) -> repr e t a -> Perm (repr e t) b (<<|?>>) :: Sym_Interleaved repr => Perm (repr e t) (a -> b) -> (a, repr e t a) -> Perm (repr e t) b (<<|*>>) :: Sym_Interleaved repr => Perm (repr e t) ([a] -> b) -> repr e t a -> Perm (repr e t) b (<<$) :: Sym_Interleaved repr => a -> repr e t b -> Perm (repr e t) a (<<$?) :: Sym_Interleaved repr => a -> (b, repr e t b) -> Perm (repr e t) a class Sym_Rule repr rule :: Sym_Rule repr => String -> repr e t a -> repr e t a class Sym_Command repr main :: Sym_Command repr => Name -> repr e t a -> repr e ArgCommand a command :: Sym_Command repr => Name -> repr e t a -> repr e ArgCommand a class Sym_AltApp repr => Sym_Option repr opt :: Sym_Option repr => OptionName -> repr e s a -> repr e ArgOption a var :: Sym_Option repr => Name -> (String -> Either e a) -> repr e ArgValue a tag :: Sym_Option repr => String -> repr e ArgValue () long :: Sym_Option repr => Name -> repr e ArgValue a -> repr e ArgOption a short :: Sym_Option repr => Char -> repr e ArgValue a -> repr e ArgOption a flag :: Sym_Option repr => OptionName -> (Bool, repr e ArgOption Bool) endOpt :: Sym_Option repr => repr e ArgOption () string :: Sym_Option repr => Name -> repr e ArgValue String data OptionName OptionName :: Char -> Name -> OptionName OptionNameLong :: Name -> OptionName OptionNameShort :: Char -> OptionName class Sym_Help d repr help :: Sym_Help d repr => d -> repr e t a -> repr e t a class Sym_Exit repr exit :: Sym_Exit repr => e -> repr e t () instance GHC.Show.Show Language.Symantic.CLI.Sym.OptionName instance GHC.Classes.Eq Language.Symantic.CLI.Sym.OptionName instance GHC.Classes.Ord Language.Symantic.CLI.Sym.OptionName module Language.Symantic.CLI.Read newtype Arg Arg :: String -> Arg [unArg] :: Arg -> String newtype Args Args :: [Arg] -> Args [unArgs] :: Args -> [Arg] newtype Parser e s a Parser :: Parsec (ErrorRead e) Args a -> Parser e s a [unParser] :: Parser e s a -> Parsec (ErrorRead e) Args a coerceParser :: Parser e s a -> Parser e t a newtype ErrorRead e ErrorRead :: e -> ErrorRead e readArgs :: Parser e s a -> Args -> Either (ParseError (Token Args) (ErrorRead e)) a instance Text.Megaparsec.Class.MonadParsec (Language.Symantic.CLI.Read.ErrorRead e) Language.Symantic.CLI.Read.Args (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.MonadPlus (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.Monad (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.Alternative (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.Applicative (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.Functor (Language.Symantic.CLI.Read.Parser e s) instance GHC.Base.Functor Language.Symantic.CLI.Read.ErrorRead instance GHC.Base.Monoid Language.Symantic.CLI.Read.Args instance GHC.Base.Semigroup Language.Symantic.CLI.Read.Args instance GHC.Show.Show Language.Symantic.CLI.Read.Args instance GHC.Classes.Ord Language.Symantic.CLI.Read.Args instance GHC.Classes.Eq Language.Symantic.CLI.Read.Args instance GHC.Show.Show Language.Symantic.CLI.Read.Arg instance GHC.Classes.Ord Language.Symantic.CLI.Read.Arg instance GHC.Classes.Eq Language.Symantic.CLI.Read.Arg instance Language.Symantic.CLI.Sym.Sym_Fun Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_App Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Alt Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_AltApp Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Interleaved Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Command Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Option Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Help d Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Rule Language.Symantic.CLI.Read.Parser instance Language.Symantic.CLI.Sym.Sym_Exit Language.Symantic.CLI.Read.Parser instance GHC.Show.Show e => GHC.Show.Show (Language.Symantic.CLI.Read.ErrorRead e) instance GHC.Classes.Eq (Language.Symantic.CLI.Read.ErrorRead a) instance GHC.Classes.Ord (Language.Symantic.CLI.Read.ErrorRead a) instance GHC.Show.Show e => Text.Megaparsec.Error.ShowErrorComponent (Language.Symantic.CLI.Read.ErrorRead e) instance Text.Megaparsec.Stream.Stream Language.Symantic.CLI.Read.Args instance Text.Megaparsec.Error.ShowToken Language.Symantic.CLI.Read.Arg module Language.Symantic.CLI.Plain class (IsString d, Semigroup d, Monoid d, Textable d, Indentable d, Breakable d, Colorable d, Decorable d) => Doc d words :: Textable d => Breakable d => String -> d -- | Constructed top-down data Reader d Reader :: (Infix, Side) -> Bool -> d -> Reader d -- | Parent operator. [reader_op] :: Reader d -> (Infix, Side) -- | Whether to print a definition, or not. [reader_define] :: Reader d -> Bool [reader_or] :: Reader d -> d defReader :: Textable d => Reader d pairIfNeeded :: Doc d => Reader d -> Infix -> d -> d newtype Plain d e t a Plain :: Reader d -> Maybe d -> Plain d e t a [unPlain] :: Plain d e t a -> Reader d -> Maybe d runPlain :: Monoid d => Plain d e t a -> Reader d -> d coercePlain :: Plain d e t a -> Plain d e u b textPlain :: Monoid d => Textable d => Plain d e t a -> d instance GHC.Base.Semigroup d => GHC.Base.Semigroup (Language.Symantic.CLI.Plain.Plain d e t a) instance (GHC.Base.Semigroup d, GHC.Base.Monoid d) => GHC.Base.Monoid (Language.Symantic.CLI.Plain.Plain d e t a) instance (GHC.Base.Semigroup d, Data.String.IsString d) => Data.String.IsString (Language.Symantic.CLI.Plain.Plain d e t a) instance GHC.Show.Show (Language.Symantic.CLI.Plain.Plain Language.Symantic.Document.Term.Term e t a) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Fun (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_App (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Alt (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_AltApp (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Interleaved (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Rule (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Option (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Command (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Help d (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Exit (Language.Symantic.CLI.Plain.Plain d) instance Language.Symantic.CLI.Plain.Doc Language.Symantic.Document.Term.Term instance Language.Symantic.CLI.Plain.Doc Language.Symantic.Document.Term.IO.TermIO module Language.Symantic.CLI.Help data Reader d Reader :: Maybe d -> Indent -> Indent -> Reader d -> Bool -> Reader d [reader_help] :: Reader d -> Maybe d [reader_command_indent] :: Reader d -> Indent [reader_option_indent] :: Reader d -> Indent [reader_plain] :: Reader d -> Reader d [reader_option_empty] :: Reader d -> Bool defReader :: Textable d => Reader d type Result d = Forest (DocNode d) defResult :: Monoid d => Result d data DocNode d Leaf :: d -> d -> DocNode d [docNodeSep] :: DocNode d -> d [docNode] :: DocNode d -> d Indented :: Indent -> d -> d -> DocNode d [docNodeIndent] :: DocNode d -> Indent [docNodeSep] :: DocNode d -> d [docNode] :: DocNode d -> d BreakableFill :: Indent -> d -> d -> DocNode d [docNodeIndent] :: DocNode d -> Indent [docNodeSep] :: DocNode d -> d [docNode] :: DocNode d -> d docTree :: Monoid d => Textable d => Indentable d => Tree (DocNode d) -> d docTrees :: Monoid d => Textable d => Indentable d => Forest (DocNode d) -> d data Help d e t a Help :: Reader d -> Result d -> Plain d e t a -> Help d e t a [help_result] :: Help d e t a -> Reader d -> Result d [help_plain] :: Help d e t a -> Plain d e t a runHelp :: Monoid d => Indentable d => Textable d => Help d e t a -> d textHelp :: Doc d => Reader d -> Help d e t a -> d coerceHelp :: Help d e s a -> Help d e t b data PermHelp d e t a PermHelp :: (Reader d -> Result d) -> [Plain d e t a] -> PermHelp d e t a instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Interleaved (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.Document.Sym.Textable d => GHC.Base.Semigroup (Language.Symantic.CLI.Help.Help d e s a) instance (Language.Symantic.Document.Sym.Textable d, GHC.Base.Monoid d) => GHC.Base.Monoid (Language.Symantic.CLI.Help.Help d e s a) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Fun (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_App (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Alt (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_AltApp (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Rule (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Option (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Help d (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Command (Language.Symantic.CLI.Help.Help d) instance Language.Symantic.CLI.Plain.Doc d => Language.Symantic.CLI.Sym.Sym_Exit (Language.Symantic.CLI.Help.Help d) module Language.Symantic.CLI