packages feed

cmdlib 0.3.2.1 → 0.3.3

raw patch · 3 files changed

+13/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ System.Console.CmdLib: recordCommand :: (Eq cmd, Eq (Record cmd), Data cmd, RecordCommand cmd, Attributes cmd) => cmd -> RecordMode cmd

Files

System/Console/CmdLib.hs view
@@ -43,6 +43,10 @@  module System.Console.CmdLib (   -- * News+  -- | Since version 0.3.3: Added 'recordCommand', making it possible to set+  -- 'defaultCommand' also for record-based command sets (and in general, use+  -- any API that expects a single Command).+  --   -- | Since version 0.3.2: Added a new Required attribute for mandatory   -- flags/arguments to be used in record-based commands. Also added automatic   -- "synopsis" derivation for record-based commands, which includes all flags@@ -97,7 +101,7 @@   , commandNames    -- * Record-based commands-  , RecordCommand(..), recordCommands, dispatchR, executeR+  , RecordCommand(..), recordCommands, dispatchR, executeR, recordCommand    -- * Utilities   , globalFlag, readCommon, (<+<), HelpCommand(..), die
System/Console/CmdLib/Record.hs view
@@ -182,6 +182,13 @@           rec_cmd x = RecordMode { rec_cmdname = nameFromConstr x                                  , rec_initial = x } +-- | Obtain a value that is an instance of Command, i.e. suitable for use with+-- "defaultCommand" and other Command-based APIs.+recordCommand :: forall cmd. (Eq cmd, Eq (Record cmd), Data cmd, RecordCommand cmd, Attributes cmd)+              => cmd -> RecordMode cmd+recordCommand x = RecordMode { rec_cmdname = nameFromConstr $ toConstr x+                             , rec_initial = toConstr x }+ -- | Record field update using a string field name. Sets a field value in a -- record, using a (string) name of the field, setField :: forall rec a. (Data rec) => String -> rec -> (forall b. (Data b) => b) -> rec
cmdlib.cabal view
@@ -1,5 +1,5 @@ name:        cmdlib-version:     0.3.2.1+version:     0.3.3 synopsis:    a library for command line parsing & online help  description: A commandline parsing library, based on getopt. Comes with a