on master help sign in
For `optparse-applicative-0.18`: use `pretty` instead of `text`
105ddd3Andreas Abel
yaml/exe/json2yaml.hs+3−3
@@ -15,7 +15,7 @@ import Options.Applicative
15 , long, metavar, short, strArgument, strOption, value
15 , long, metavar, short, strArgument, strOption, value
16 )
16 )
17import Options.Applicative.Help.Pretty
17import Options.Applicative.Help.Pretty
18− ( vcat, text )
18+ ( vcat, pretty )
19
19
20import System.Exit ( die )
20import System.Exit ( die )
21
21
@@ -43,11 +43,11 @@ options =
43 <> footerDoc fdoc
43 <> footerDoc fdoc
44
44
45 where
45 where
46− hdoc = Just $ vcat $ map text
46+ hdoc = Just $ vcat $ map pretty
47 [ versionText self
47 [ versionText self
48 , "Convert JSON to YAML."
48 , "Convert JSON to YAML."
49 ]
49 ]
50− fdoc = Just $ text $ concat
50+ fdoc = Just $ pretty $ concat
51 [ "The old call pattern '"
51 [ "The old call pattern '"
52 , self
52 , self
53 , " IN OUT' is also accepted, but deprecated."
53 , " IN OUT' is also accepted, but deprecated."
yaml/exe/yaml2json.hs+2−2
@@ -17,7 +17,7 @@ import Options.Applicative
17 , long, metavar, short, strArgument, strOption, value
17 , long, metavar, short, strArgument, strOption, value
18 )
18 )
19import Options.Applicative.Help.Pretty
19import Options.Applicative.Help.Pretty
20− ( vcat, text )
20+ ( vcat, pretty )
21
21
22import Common
22import Common
23 ( versionText, versionOption, numericVersionOption, dashToNothing )
23 ( versionText, versionOption, numericVersionOption, dashToNothing )
@@ -43,7 +43,7 @@ options =
43 (headerDoc hdoc)
43 (headerDoc hdoc)
44
44
45 where
45 where
46− hdoc = Just $ vcat $ map text
46+ hdoc = Just $ vcat $ map pretty
47 [ versionText self
47 [ versionText self
48 , "Convert YAML to JSON."
48 , "Convert YAML to JSON."
49 ]
49 ]