From 26cebf4eb01b0f84e268c1f5265eb6ccfbca11b9 Mon Sep 17 00:00:00 2001 From: Peter Lebbing Date: Sun, 25 Feb 2024 11:59:59 +0100 Subject: [PATCH 1/2] Fix some Haddock quoting issues --- System/Console/Docopt/ParseUtils.hs | 4 ++-- System/Console/Docopt/Public.hs | 2 +- System/Console/Docopt/UsageParse.hs | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/System/Console/Docopt/ParseUtils.hs b/System/Console/Docopt/ParseUtils.hs index fbfacd4..b2b5e07 100644 --- a/System/Console/Docopt/ParseUtils.hs +++ b/System/Console/Docopt/ParseUtils.hs @@ -76,8 +76,8 @@ manyTill1 p end = do rest <- manyTill p end return $ first : rest --- |@skipUntil p@ ignores everything that comes before `p`. --- Returns what `p` returns. +-- |@skipUntil p@ ignores everything that comes before @p@. +-- Returns what @p@ returns. skipUntil :: Show a => CharParser u a -> CharParser u () skipUntil p = skipMany (notFollowedBy p >> anyChar) diff --git a/System/Console/Docopt/Public.hs b/System/Console/Docopt/Public.hs index 650a04d..0f0eb3a 100644 --- a/System/Console/Docopt/Public.hs +++ b/System/Console/Docopt/Public.hs @@ -107,7 +107,7 @@ notPresent = (not .) . isPresent -- > Usage: -- > prog -- --- then @getArg args (argument \'required\')@ is guaranteed to be a 'Just'. +-- then @getArg args (argument "required")@ is guaranteed to be a 'Just'. getArg :: Arguments -> Option -> Maybe String getArg args opt = case opt `M.lookup` args of diff --git a/System/Console/Docopt/UsageParse.hs b/System/Console/Docopt/UsageParse.hs index 54c8f1c..e20c567 100644 --- a/System/Console/Docopt/UsageParse.hs +++ b/System/Console/Docopt/UsageParse.hs @@ -158,7 +158,7 @@ pUsagePatterns = do -- * Option Synonyms & Defaults Parsers -- | Succeeds only on the first line of an option explanation --- (one whose first non-space character is '-') +-- (one whose first non-space character is @\'-\'@) begOptionLine :: CharParser OptInfoMap String begOptionLine = inlineSpaces >> lookAhead (char '-') >> return "-" @@ -256,8 +256,11 @@ canRepeat pat target = -- | Compare on specificity of parsers built from optA and optB, -- so we can be sure the parser tries the most-specific first, where possible. -- E.g. --- LongOption "option" > ShortOption 'o' == True --- Command "cmd" > Argument "arg" == True +-- +-- @ +-- LongOption "option" > ShortOption \'o\' == True +-- Command "cmd" > Argument "arg" == True +-- @ compareOptSpecificity :: Option -> Option -> Ordering compareOptSpecificity optA optB = case optA of LongOption a -> case optB of From 069bd79f83550d071b024e98e84d581c9ddbe0d1 Mon Sep 17 00:00:00 2001 From: Peter Lebbing Date: Sun, 25 Feb 2024 11:00:13 +0100 Subject: [PATCH 2/2] Release 0.7.0.8 PR and issue numbers in the changelog have been converted to links to the respective PR/issue. --- CHANGELOG.md | 30 ++++++++++++++++++------------ docopt.cabal | 21 +++++++++++++++++++-- 2 files changed, 37 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 423618f..146be99 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,30 +1,36 @@ -### 0.7.0.7 (unreleased) +### 0.7.0.8 + +- Add support for `containers-0.7` [#58](https://github.com/docopt/docopt.hs/pull/58), [#60](https://github.com/docopt/docopt.hs/pull/60) + +- Extend Template Haskell Quasi-quotation support to GHC 8.0-8.6. Template Haskell support is no longer optional. The package now supports all GHC's from 8.0 to 9.8. [#56](https://github.com/docopt/docopt.hs/pull/56), [#58](https://github.com/docopt/docopt.hs/pull/58) + +### 0.7.0.7 - update bounds, fix warnings, require ghc 8.0+ ### 0.7.0.6 -- Fixes issue causing compilation error to happen with ghc-8.8.2 [#33][#34] +- Fixes issue causing compilation error to happen with ghc-8.8.2 [#33](https://github.com/docopt/docopt.hs/issues/33), [#34](https://github.com/docopt/docopt.hs/pull/34) ### 0.7.0.5 -- Fix an issue where in some cases pattern lines were matched out of order [#16] -- Strip leading & trailing newlines from usage, for quasiquoter ease [#28] -- Fix tests run against latest aeson 1.0.2.0 [#29] +- Fix an issue where in some cases pattern lines were matched out of order [#16](https://github.com/docopt/docopt.hs/issues/16) +- Strip leading & trailing newlines from usage, for quasiquoter ease [#28](https://github.com/docopt/docopt.hs/issues/28) +- Fix tests run against latest aeson 1.0.2.0 [#29](https://github.com/docopt/docopt.hs/issues/29) ### 0.7.0.4 -- Fix the test suite when run from a distributed tarball [#21] +- Fix the test suite when run from a distributed tarball [#21](https://github.com/docopt/docopt.hs/pull/21) - Make the test suite more developer-friendly ### 0.7.0.3 -- Fix `isPresent` treatment of repeatable arguments/options [#15] -- Fix build failure for stackage inclusion [#20] +- Fix `isPresent` treatment of repeatable arguments/options [#15](https://github.com/docopt/docopt.hs/issues/15) +- Fix build failure for stackage inclusion [#20](https://github.com/docopt/docopt.hs/pull/20) ### 0.7.0.2 -- Minor docs/README tweaks [#13] +- Minor docs/README tweaks [#13](https://github.com/docopt/docopt.hs/issues/13) ### 0.7.0.1 @@ -32,13 +38,13 @@ # 0.7.0.0 -- Add usage parsing QuasiQuoters [#7] +- Add usage parsing QuasiQuoters [#7](https://github.com/docopt/docopt.hs/pull/7) - Add `docopt` usage parsing QuasiQuoter - Add `docoptFile` usage parsing QuasiQuoter - Add `System.Docopt.NoTH` module - Add `parseUsage` - Add `parseUsageOrExit` -- New API organization [#10] +- New API organization [#10](https://github.com/docopt/docopt.hs/issues/10) - Remove `optionsWithUsage` - Remove `optionsWithUsageDebug` - Remove `optionsWithUsageFile` @@ -59,7 +65,7 @@ ### 0.6.0.2 -- Make `argument` not require its named option wrapped in angle brackets. [#4, #5] +- Make `argument` not require its named option wrapped in angle brackets. [#4](https://github.com/docopt/docopt.hs/pull/4), [#5](https://github.com/docopt/docopt.hs/pull/5) ### 0.6.0.1 diff --git a/docopt.cabal b/docopt.cabal index cc5c34f..e7af16e 100644 --- a/docopt.cabal +++ b/docopt.cabal @@ -1,13 +1,25 @@ name: docopt -version: 0.7.0.7 +version: 0.7.0.8 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. license: MIT license-file: LICENSE.txt author: Ryan Artecona -maintainer: ryanartecona@gmail.com +maintainer: QBayLogic B.V. copyright: (c) 2013-2015 Ryan Artecona +tested-with: + GHC == 8.0.2, + GHC == 8.2.2, + GHC == 8.4.4, + GHC == 8.6.5, + GHC == 8.8.4, + GHC == 8.10.7, + GHC == 9.0.2, + GHC == 9.2.8, + GHC == 9.4.7, + GHC == 9.6.3, + GHC == 9.8.1 category: Console @@ -27,6 +39,11 @@ source-repository head type: git location: https://github.com/docopt/docopt.hs.git +source-repository this + type: git + location: https://github.com/docopt/docopt.hs.git + tag: v0.7.0.8 + library exposed-modules: System.Console.Docopt.NoTH System.Console.Docopt