cmdargs 0.6.4 → 0.6.5
raw patch · 3 files changed
+5/−3 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- System/Console/CmdArgs/Explicit/Process.hs +2/−1
- System/Console/CmdArgs/Implicit/Read.hs +2/−1
- cmdargs.cabal +1/−1
System/Console/CmdArgs/Explicit/Process.hs view
@@ -7,6 +7,7 @@ import Data.Maybe import System.Environment import System.Exit+import System.IO -- | Process the flags obtained by @getArgs@ with a mode. Displays@@ -16,7 +17,7 @@ processArgs m = do xs <- getArgs case process m xs of- Left x -> do putStrLn x; exitFailure+ Left x -> do hPutStrLn stderr x; exitFailure Right x -> return x
System/Console/CmdArgs/Implicit/Read.hs view
@@ -1,4 +1,4 @@-+{-# LANGUAGE PatternGuards #-} module System.Console.CmdArgs.Implicit.Read(isReadBool, toReadContainer, reader, addContainer, readHelp) where import Data.Generics.Any@@ -93,6 +93,7 @@ readEnum:: String -> [(String,a)] -> Either String a readEnum a xs | null ys = Left $ "Could not read, expected one of: " ++ unwords (map fst xs)+ | Just (_,el) <- find (\x -> a == fst x) ys = Right el | length ys > 1 = Left $ "Ambiguous read, could be any of: " ++ unwords (map fst ys) | otherwise = Right $ snd $ head ys where ys = filter (\x -> a `isPrefixOf` fst x) xs
cmdargs.cabal view
@@ -1,7 +1,7 @@ cabal-version: >= 1.6 build-type: Simple name: cmdargs-version: 0.6.4+version: 0.6.5 license: BSD3 license-file: LICENSE category: Console