docopt 0.7.0.0 → 0.7.0.1
raw patch · 4 files changed
+12/−2 lines, 4 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- README.md +3/−0
- System/Console/Docopt.hs +4/−1
- docopt.cabal +1/−1
CHANGELOG.md view
@@ -1,3 +1,7 @@+### 0.7.0.1++- Fix docs in README and in Docopt.hs+ # 0.7.0.0 - Add usage parsing QuasiQuoters [#7]
README.md view
@@ -24,10 +24,13 @@ {-# LANGUAGE QuasiQuotes #-} import Control.Monad (when) import Data.Char (toUpper)+import System.Environment (getArgs) import System.Console.Docopt patterns :: Docopt patterns = [docoptFile|USAGE.txt|]++getArgOrExit = getArgOrExitWith patterns main = do args <- parseArgsOrExit patterns =<< getArgs
System/Console/Docopt.hs view
@@ -6,6 +6,7 @@ -- -- import Control.Monad (when) -- import Data.Char (toUpper)+-- import System.Environment (getArgs) -- import System.Console.Docopt -- -- patterns :: Docopt@@ -20,9 +21,11 @@ -- -c, --caps Caps-lock the echoed argument -- |] --+-- getArgOrExit = getArgOrExitWith patterns+-- -- main :: IO () -- main = do--- args <- parseArgsOrExit patterns+-- args <- parseArgsOrExit patterns =<< getArgs -- -- when (args \`isPresent\` (command \"cat\")) $ do -- file <- args \`getArgOrExit\` (argument \"file\")
docopt.cabal view
@@ -1,5 +1,5 @@ name: docopt-version: 0.7.0.0+version: 0.7.0.1 synopsis: A command-line interface parser that will make you smile description: Docopt parses command-line interface usage text that adheres to a familiar syntax, and from it builds a command-line argument parser that will ensure your program is invoked correctly with the available options specified in the usage text. This allows the developer to write a usage text and get an argument parser for free.