-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Application library for building interactive console CLIs -- -- This module provides the tools to build a complete "structured" CLI -- application, similar to those found in systems like Cisco IOS or -- console configuration utilities etc. It aims to be easy for -- implementors to use. @package structured-cli @version 0.9.4.0 -- | This module provides the tools to build a complete "structured" CLI -- application, similar to those found in systems like Cisco IOS or -- console configuration utilities etc. It aims to be easy for -- implementors to use. module System.Console.StructuredCLI type Action m = CState m Int type Commands = CommandsT IO newtype CommandsT m a CommandsT :: m (a, [Node m]) -> CommandsT m a [runCommandsT] :: CommandsT m a -> m (a, [Node m]) data Parser m data ParseResult Done :: String -> String -> ParseResult Fail :: String -> (Maybe String) -> ParseResult Options :: String -> [String] -> ParseResult Partial :: ParseResult data Settings Settings :: Maybe FilePath -> String -> String -> Bool -> Settings [history] :: Settings -> Maybe FilePath [banner] :: Settings -> String [prompt] :: Settings -> String [batch] :: Settings -> Bool data State m State :: [Node m] -> [String] -> State m [nodes] :: State m -> [Node m] [labels] :: State m -> [String] (>+) :: (Monad m) => CommandsT m () -> CommandsT m () -> CommandsT m () command :: (MonadIO m) => String -> Maybe String -> Maybe (Action m) -> CommandsT m () exit :: (MonadIO m) => Maybe String -> CommandsT m () mkParser :: (MonadIO m) => (Bool -> String -> m ParseResult) -> Parser m -- | Write a string to the user's standard output, followed by a newline. outputStrLn :: MonadIO m => String -> InputT m () param :: (Monad m) => String -> Maybe String -> Parser m -> Maybe (Action m) -> CommandsT m () popCommand :: (Monad m) => CState m () pushCommand :: (Monad m) => Node m -> String -> CState m () runCLI :: (MonadException m) => String -> Maybe Settings -> CommandsT m () -> m () top :: (MonadIO m) => Maybe String -> CommandsT m () instance GHC.Show.Show System.Console.StructuredCLI.ParseResult instance GHC.Show.Show System.Console.StructuredCLI.CLIException instance GHC.Base.Functor f => GHC.Base.Functor (System.Console.StructuredCLI.CommandsT f) instance GHC.Base.Applicative a => GHC.Base.Applicative (System.Console.StructuredCLI.CommandsT a) instance GHC.Base.Monad m => GHC.Base.Monad (System.Console.StructuredCLI.CommandsT m) instance Control.Monad.Trans.Class.MonadTrans System.Console.StructuredCLI.CommandsT instance Control.Monad.IO.Class.MonadIO m => Control.Monad.IO.Class.MonadIO (System.Console.StructuredCLI.CommandsT m) instance Control.Monad.IO.Class.MonadIO m => Data.Default.Class.Default (System.Console.StructuredCLI.Parser m) instance GHC.Exception.Exception System.Console.StructuredCLI.CLIException instance Data.Default.Class.Default System.Console.StructuredCLI.Settings