packages feed

cmdargs 0.10.19 → 0.10.20

raw patch · 3 files changed

+9/−30 lines, 3 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

+ System.Console.CmdArgs.GetOpt: instance GHC.Base.Functor System.Console.CmdArgs.GetOpt.ArgOrder
- System.Console.CmdArgs.GetOpt: Option :: [Char] -> [String] -> (ArgDescr a) -> String -> OptDescr a
+ System.Console.CmdArgs.GetOpt: Option :: [Char] -> [String] -> ArgDescr a -> String -> OptDescr a
- System.Console.CmdArgs.GetOpt: data ArgDescr a
+ System.Console.CmdArgs.GetOpt: data ArgDescr a :: * -> *
- System.Console.CmdArgs.GetOpt: data OptDescr a
+ System.Console.CmdArgs.GetOpt: data OptDescr a :: * -> *

Files

CHANGES.txt view
@@ -1,5 +1,7 @@ Changelog for CmdArgs +0.10.20, released 2018-01-22+    #54, use the getopt data types from base 0.10.19, released 2018-01-01     #47, ensure Semigroup instance on all GHC versions 0.10.18, released 2017-09-24
System/Console/CmdArgs/GetOpt.hs view
@@ -9,6 +9,7 @@     ) where  import System.Console.CmdArgs.Explicit+import System.Console.GetOpt(OptDescr(..), ArgDescr(..))   -- | What to do with options following non-options.@@ -16,36 +17,12 @@ --   /Changes:/ Only 'Permute' is allowed, both @RequireOrder@ and @ReturnInOrder@ --   have been removed. data ArgOrder a = Permute----- | Each 'OptDescr' describes a single option/flag.------   The arguments to 'Option' are:------   * list of short option characters------   * list of long option strings (without @\"--\"@, may not be 1 character long)------   * argument descriptor------   * explanation of option for userdata-data OptDescr a = Option-    [Char]-    [String]-    (ArgDescr a)-    String----- | Describes whether an option takes an argument or not, and if so---   how the argument is injected into a value of type @a@.-data ArgDescr a-   = NoArg                   a         -- ^ no argument expected-   | ReqArg (String       -> a) String -- ^ option requires argument-   | OptArg (Maybe String -> a) String -- ^ optional argument+instance Functor ArgOrder where+    fmap _ Permute = Permute   -- | Return a string describing the usage of a command, derived from---   the header (first argument) and the options described by the +--   the header (first argument) and the options described by the --   second argument. usageInfo :: String -> [OptDescr a] -> String usageInfo desc flags = unlines $ desc : drop 2 (lines $ show $ convert "" flags)@@ -58,7 +35,7 @@ -- --   * The option descriptions (see 'OptDescr') -----   * The actual command line arguments (presumably got from +--   * The actual command line arguments (presumably got from --     'System.Environment.getArgs'). -- --   'getOpt' returns a triple consisting of the option arguments, a list
cmdargs.cabal view
@@ -1,7 +1,7 @@ cabal-version:      >= 1.18 build-type:         Simple name:               cmdargs-version:            0.10.19+version:            0.10.20 license:            BSD3 license-file:       LICENSE category:           Console@@ -33,7 +33,7 @@ extra-doc-files:     README.md     CHANGES.txt-tested-with:        GHC==8.2.1, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2+tested-with:        GHC==8.2.2, GHC==8.0.2, GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2  source-repository head     type:     git