structured-cli 2.5.2.0 → 2.6.0.0
raw patch · 2 files changed
+9/−5 lines, 2 filesdep +exceptionsdep ~haskeline
Dependencies added: exceptions
Dependency ranges changed: haskeline
Files
src/System/Console/StructuredCLI.hs view
@@ -107,6 +107,7 @@ import Control.Applicative (liftA2) import Control.Monad (replicateM_, void, when)+import Control.Monad.Catch (MonadMask) import Control.Monad.Except (ExceptT(..), catchError, runExceptT, throwError) import Control.Monad.IO.Class (MonadIO, liftIO) import Control.Monad.Trans (MonadTrans, lift)@@ -115,7 +116,6 @@ import Data.Char (isSpace) import Data.Default (Default, def) import Data.List (intercalate, isPrefixOf, sort)-import System.Console.Haskeline (MonadException) import qualified System.Console.Haskeline as HL @@ -504,7 +504,10 @@ -- | Launches the CLI application. It doesn't normally return unless an exception is thrown -- or if it runs out of input in batch mode. Normal return value is that returned by the CommandsT -- action that built the tree. Remember that 'Settings' is an instance of 'Default'-runCLI :: (MonadException m) => String -> Settings m -> CommandsT m a -> m (Either CLIException a)+runCLI :: (MonadMask m, MonadIO m) => String+ -> Settings m+ -> CommandsT m a+ -> m (Either CLIException a) runCLI name settings@Settings{..} commands = do (value, root) <- runCommandsT commands when (not isBatch) $ liftIO . putStrLn $ getBanner@@ -551,7 +554,7 @@ defExceptionHandler e = return . Left $ e -runLevel :: (?settings::Settings m, MonadException m) => ParserT m ()+runLevel :: (?settings::Settings m, MonadMask m, MonadIO m) => ParserT m () runLevel = do prompt <- liftUserM . buildPrompt =<< withLabels stack0 <- getStack
structured-cli.cabal view
@@ -1,5 +1,5 @@ name: structured-cli-version: 2.5.2.0+version: 2.6.0.0 synopsis: Application library for building interactive console CLIs description: 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. homepage: https://gitlab.com/codemonkeylabs/structured-cli#readme@@ -27,7 +27,8 @@ exposed-modules: System.Console.StructuredCLI build-depends: base >= 4.9.1.0 && < 5 , data-default >= 0.7.1.1 && < 0.8- , haskeline >= 0.7.4.0 && < 0.8+ , exceptions >= 0.6 && < 0.11+ , haskeline >= 0.7.4.0 && < 0.9 , mtl >= 2.2.1 && < 3.0 , split >= 0.2.3.2 && < 0.3 , transformers >= 0.5.2.0 && < 0.6