Skip to content

Commit c3d0807

Browse files
committed
Remove ineffectual description builder modifiers.
These haven't done anything since 0.8.
1 parent c705a71 commit c3d0807

File tree

13 files changed

+19
-37
lines changed

13 files changed

+19
-37
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
- Fix for showHelpOnEmpty so that it works correctly when subParserInline is
44
also active.
55

6+
- Remove `fullDesc` and `briefDesc` builder modifiers – they have not had an
7+
effect since version 0.8.
68

79
## Version 0.19.0.0 (03 June 2025)
810

src/Options/Applicative.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -157,8 +157,6 @@ module Options.Applicative (
157157
ParserInfo(..),
158158

159159
InfoMod,
160-
fullDesc,
161-
briefDesc,
162160
header,
163161
headerDoc,
164162
footer,

src/Options/Applicative/Builder.hs

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,6 @@ module Options.Applicative.Builder (
6464

6565
-- * Builder for 'ParserInfo'
6666
InfoMod,
67-
fullDesc,
68-
briefDesc,
6967
header,
7068
headerDoc,
7169
footer,
@@ -443,14 +441,6 @@ instance Monoid (InfoMod a) where
443441
instance Semigroup (InfoMod a) where
444442
m1 <> m2 = InfoMod $ applyInfoMod m2 . applyInfoMod m1
445443

446-
-- | Show a full description in the help text of this parser (default).
447-
fullDesc :: InfoMod a
448-
fullDesc = InfoMod $ \i -> i { infoFullDesc = True }
449-
450-
-- | Only show a brief description in the help text of this parser.
451-
briefDesc :: InfoMod a
452-
briefDesc = InfoMod $ \i -> i { infoFullDesc = False }
453-
454444
-- | Specify a header for this parser.
455445
header :: String -> InfoMod a
456446
header s = InfoMod $ \i -> i { infoHeader = paragraph s }
@@ -513,7 +503,6 @@ info parser m = applyInfoMod m base
513503
where
514504
base = ParserInfo
515505
{ infoParser = parser
516-
, infoFullDesc = True
517506
, infoProgDesc = mempty
518507
, infoHeader = mempty
519508
, infoFooter = mempty

src/Options/Applicative/Help/Levenshtein.hs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
{-# OPTIONS_GHC -Wno-unrecognised-warning-flags #-}
2+
{-# OPTIONS_GHC -Wno-x-partial #-}
13
module Options.Applicative.Help.Levenshtein (
24
editDistance
35
) where

src/Options/Applicative/Types.hs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,6 @@ instance Semigroup ParseError where
8989
-- | A full description for a runnable 'Parser' for a program.
9090
data ParserInfo a = ParserInfo
9191
{ infoParser :: Parser a -- ^ the option parser for the program
92-
, infoFullDesc :: Bool -- ^ whether the help text should contain full
93-
-- documentation
9492
, infoProgDesc :: Chunk Doc -- ^ brief parser description
9593
, infoHeader :: Chunk Doc -- ^ header of the full parser description
9694
, infoFooter :: Chunk Doc -- ^ footer of the full parser description

tests/Examples/Hello.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,7 @@ main = greet =<< execParser opts
3333

3434
opts :: ParserInfo Sample
3535
opts = info (sample <**> helper)
36-
( fullDesc
37-
<> progDesc "Print a greeting for TARGET"
36+
( progDesc "Print a greeting for TARGET"
3837
<> header "hello - a test for optparse-applicative" )
3938

4039
greet :: Sample -> IO ()

tests/Examples/ParserGroup/AllGrouped.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ opts :: ParserInfo Sample
8080
opts =
8181
info
8282
sample
83-
( fullDesc
84-
<> progDesc "Every option is grouped"
83+
( progDesc "Every option is grouped"
8584
<> header "parser_group.all_grouped - a test for optparse-applicative"
8685
)
8786

tests/Examples/ParserGroup/Basic.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,7 @@ opts :: ParserInfo Sample
100100
opts =
101101
info
102102
(sample <**> helper)
103-
( fullDesc
104-
<> progDesc "Shows parser groups"
103+
( progDesc "Shows parser groups"
105104
<> header "parser_group.basic - a test for optparse-applicative"
106105
)
107106

tests/Examples/ParserGroup/CommandGroups.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,8 +123,7 @@ opts :: ParserInfo Sample
123123
opts =
124124
info
125125
(sample <**> helper)
126-
( fullDesc
127-
<> progDesc "Option and command groups"
126+
( progDesc "Option and command groups"
128127
<> header "parser_group.command_groups - a test for optparse-applicative"
129128
)
130129

tests/Examples/ParserGroup/DuplicateCommandGroups.hs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ opts :: ParserInfo Sample
8181
opts =
8282
info
8383
(sample <**> helper)
84-
( fullDesc
85-
<> progDesc "Duplicate consecutive command groups consolidated"
84+
( progDesc "Duplicate consecutive command groups consolidated"
8685
<> header "parser_group.duplicate_command_groups - a test for optparse-applicative"
8786
)
8887

0 commit comments

Comments
 (0)