Skip to content

Commit

Permalink
Merge pull request #61 from docopt/release-0.7.0.8
Browse files Browse the repository at this point in the history
Release 0.7.0.8
  • Loading branch information
DigitalBrains1 authored Feb 26, 2024
2 parents de4216f + 069bd79 commit 47516ac
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 20 deletions.
30 changes: 18 additions & 12 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,50 @@
### 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

- Fix docs in README and in Docopt.hs

# 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`
Expand All @@ -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

Expand Down
4 changes: 2 additions & 2 deletions System/Console/Docopt/ParseUtils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion System/Console/Docopt/Public.hs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ notPresent = (not .) . isPresent
-- > Usage:
-- > prog <required>
--
-- 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
Expand Down
9 changes: 6 additions & 3 deletions System/Console/Docopt/UsageParse.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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 "-"

Expand Down Expand Up @@ -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
Expand Down
21 changes: 19 additions & 2 deletions docopt.cabal
Original file line number Diff line number Diff line change
@@ -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. <devops@qbaylogic.com>
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

Expand All @@ -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
Expand Down

0 comments on commit 47516ac

Please sign in to comment.