packages feed

climb 0.5.0 → 0.5.1

raw patch · 2 files changed

+12/−12 lines, 2 filesdep ~linenoisePVP ok

version bump matches the API change (PVP)

Dependency ranges changed: linenoise

API changes (from Hackage documentation)

Files

climb.cabal view
@@ -1,13 +1,13 @@ cabal-version: 1.12 --- This file has been generated from package.yaml by hpack version 0.36.0.+-- This file has been generated from package.yaml by hpack version 0.37.0. -- -- see: https://github.com/sol/hpack ----- hash: a74d63a6492ae659aa9ca016c20dbb590adfb5e347df479d81021fe81895cec1+-- hash: 62b124d5c5b6fc6ffe423ff59768627f4c9fcad2d95b22f794f79d35e314d807  name:           climb-version:        0.5.0+version:        0.5.1 synopsis:       Building blocks for a GHCi-like REPL with colon-commands description:    Please see the README on GitHub at <https://github.com/ejconlon/climb#readme> category:       User Interfaces@@ -42,7 +42,7 @@     , bytestring >=0.10 && <1     , containers >=0.6 && <1     , exceptions >=0.10 && <1-    , linenoise >=0.4.0 && <1+    , linenoise >=0.4.2 && <1     , mtl >=2.2 && <3     , text >=1.2 && <3     , unliftio-core >=0.1 && <1@@ -64,7 +64,7 @@     , climb     , containers >=0.6 && <1     , exceptions >=0.10 && <1-    , linenoise >=0.4.0 && <1+    , linenoise >=0.4.2 && <1     , mtl >=2.2 && <3     , text >=1.2 && <3     , unliftio-core >=0.1 && <1
src/Climb.hs view
@@ -62,17 +62,17 @@ noOptionCommands :: OptionCommands m noOptionCommands = Map.empty -noCompletion :: Applicative m => Completion m+noCompletion :: (Applicative m) => Completion m noCompletion = const (pure []) -assertEmpty :: MonadThrow m => Text -> m ()+assertEmpty :: (MonadThrow m) => Text -> m () assertEmpty input = unless (Text.null input) (throwM CommandErrExpectedNoInput)  -- | Helps you define commands that expect no input.-bareCommand :: MonadThrow m => m ReplDirective -> Command m+bareCommand :: (MonadThrow m) => m ReplDirective -> Command m bareCommand act input = assertEmpty input >> act -quitCommand :: MonadThrow m => Command m+quitCommand :: (MonadThrow m) => Command m quitCommand = bareCommand (pure ReplQuit)  helpCommand :: (MonadThrow m, MonadIO m) => OptionCommands m -> Command m@@ -88,7 +88,7 @@     , ("help", ("describe all commands", helpCommand opts))     ] -outerCommand :: MonadThrow m => OptionCommands m -> Command m -> Command m+outerCommand :: (MonadThrow m) => OptionCommands m -> Command m -> Command m outerCommand opts exec input =   case Text.uncons input of     Just (':', rest) -> do@@ -104,7 +104,7 @@     Just (SomeAsyncException _) -> False     _ -> True -catchUserErr :: MonadCatch m => m a -> (SomeException -> m a) -> m a+catchUserErr :: (MonadCatch m) => m a -> (SomeException -> m a) -> m a catchUserErr = catchIf isUserErr  handleUserErr :: (MonadCatch m, MonadIO m) => Command m -> Command m@@ -125,5 +125,5 @@  -- | Processes a single line of input. Useful for testing. -- (Note that this does not handle default option commands.)-stepReplDef :: MonadThrow m => ReplDef m -> Text -> m ReplDirective+stepReplDef :: (MonadThrow m) => ReplDef m -> Text -> m ReplDirective stepReplDef (ReplDef _ _ _ opts exec _) = outerCommand opts exec