packages feed

cmdlib 0.2 → 0.2.1

raw patch · 2 files changed

+5/−3 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

System/Console/CmdLib/Record.hs view
@@ -115,7 +115,7 @@   -- | Provide a help string for each mode. Used in help output. Again, pattern   -- match like in @run'@.   mode_summary :: cmd -> String-  mode_summary _ = "(no summary available)"+  mode_summary _ = ""  data RecordMode cmd = RecordMode { rec_cmdname :: String                                  , rec_initial :: Constr }@@ -172,7 +172,9 @@ dispatchR dopt _ opts = dispatch' dopt (recordCommands (undefined :: cmd)) opts >>= \c -> case c of   Nothing -> exitWith ExitSuccess >> return undefined   Just (CommandWrap x, opts') -> execute' x opts' >>= \c -> case c of-    Just (command, _) -> return $ fromMaybe (error "bla") (cast command)+    Just (command, opts') -> case (cast command) of+      Just comm -> return comm+      Nothing -> execute x opts' >> exitWith ExitSuccess >> return undefined     Nothing -> exitWith ExitSuccess >> return undefined  executeR :: forall cmd. (Eq (Record cmd), Attributes cmd, RecordCommand cmd) => cmd -> [String] -> IO cmd
cmdlib.cabal view
@@ -1,5 +1,5 @@ name:                cmdlib-version:             0.2+version:             0.2.1 synopsis:            a library for command line parsing & online help  description: An alternative to cmdargs, based on getopt. Comes with a powerful