Skip to content

Commit 8780cd5

Browse files
committed
Changes to Haskell files (to be cleaned up)
1 parent d54cfca commit 8780cd5

File tree

6 files changed

+38
-109
lines changed

6 files changed

+38
-109
lines changed

cardano-cli/cardano-cli.cabal

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,6 @@ library
153153
Cardano.CLI.Parser
154154
Cardano.CLI.Pretty
155155
Cardano.CLI.Read
156-
Cardano.CLI.Render
157156
Cardano.CLI.Run
158157
Cardano.CLI.Run.Debug
159158
Cardano.CLI.Run.Debug.LogEpochState

cardano-cli/src/Cardano/CLI/EraBased/Options/Transaction.hs

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import Cardano.CLI.Types.Common
1919
import Data.Foldable
2020
import Options.Applicative hiding (help, str)
2121
import qualified Options.Applicative as Opt
22-
import qualified Options.Applicative.Help as H
2322
import Prettyprinter (line)
2423

2524
{- HLINT ignore "Use <$>" -}
@@ -47,13 +46,13 @@ pTransactionCmds era envCli =
4746
[ pretty @String "Build a transaction (low-level, inconvenient)"
4847
, line
4948
, line
50-
, H.yellow $
51-
mconcat
52-
[ "Please note "
53-
, H.underline "the order"
54-
, " of some cmd options is crucial. If used incorrectly may produce "
55-
, "undesired tx body. See nested [] notation above for details."
56-
]
49+
, -- H.yellow $
50+
mconcat
51+
[ "Please note "
52+
, {- H.underline -} "the order"
53+
, " of some cmd options is crucial. If used incorrectly may produce "
54+
, "undesired tx body. See nested [] notation above for details."
55+
]
5756
]
5857
, pTransactionBuildCmd era envCli
5958
, forShelleyBasedEraInEon era Nothing (`pTransactionBuildEstimateCmd` envCli)
@@ -158,13 +157,13 @@ pTransactionBuildCmd era envCli = do
158157
[ pretty @String "Build a balanced transaction (automatically calculates fees)"
159158
, line
160159
, line
161-
, H.yellow $
162-
mconcat
163-
[ "Please note "
164-
, H.underline "the order"
165-
, " of some cmd options is crucial. If used incorrectly may produce "
166-
, "undesired tx body. See nested [] notation above for details."
167-
]
160+
, -- H.yellow $
161+
mconcat
162+
[ "Please note "
163+
, {- H.underline -} "the order"
164+
, " of some cmd options is crucial. If used incorrectly may produce "
165+
, "undesired tx body. See nested [] notation above for details."
166+
]
168167
]
169168
where
170169
pCmd :: ShelleyBasedEra era -> Parser (TransactionCmds era)
@@ -216,13 +215,13 @@ pTransactionBuildEstimateCmd era _envCli = do
216215
"Build a balanced transaction without access to a live node (automatically estimates fees)"
217216
, line
218217
, line
219-
, H.yellow $
220-
mconcat
221-
[ "Please note "
222-
, H.underline "the order"
223-
, " of some cmd options is crucial. If used incorrectly may produce "
224-
, "undesired tx body. See nested [] notation above for details."
225-
]
218+
, -- H.yellow $
219+
mconcat
220+
[ "Please note "
221+
, {- H.underline -} "the order"
222+
, " of some cmd options is crucial. If used incorrectly may produce "
223+
, "undesired tx body. See nested [] notation above for details."
224+
]
226225
]
227226
where
228227
pCmd :: MaryEraOnwards era -> Parser (TransactionCmds era)

cardano-cli/src/Cardano/CLI/Legacy/Options.hs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ import Data.Maybe (fromMaybe, maybeToList)
4949
import Data.Word (Word64)
5050
import Options.Applicative hiding (help, str)
5151
import qualified Options.Applicative as Opt
52-
import qualified Options.Applicative.Help as H
5352
import Prettyprinter (line)
5453

5554
{- HLINT ignore "Use <$>" -}
@@ -235,13 +234,13 @@ pTransaction envCli =
235234
[ pretty @String "Build a transaction (low-level, inconvenient)"
236235
, line
237236
, line
238-
, H.yellow $
239-
mconcat
240-
[ "Please note "
241-
, H.underline "the order"
242-
, " of some cmd options is crucial. If used incorrectly may produce "
243-
, "undesired tx body. See nested [] notation above for details."
244-
]
237+
, -- H.yellow $
238+
mconcat
239+
[ "Please note "
240+
, {- H.underline -} "the order"
241+
, " of some cmd options is crucial. If used incorrectly may produce "
242+
, "undesired tx body. See nested [] notation above for details."
243+
]
245244
]
246245
, subParser "build" $
247246
Opt.info pTransactionBuild $
@@ -251,13 +250,13 @@ pTransaction envCli =
251250
[ pretty @String "Build a balanced transaction (automatically calculates fees)"
252251
, line
253252
, line
254-
, H.yellow $
255-
mconcat
256-
[ "Please note "
257-
, H.underline "the order"
258-
, " of some cmd options is crucial. If used incorrectly may produce "
259-
, "undesired tx body. See nested [] notation above for details."
260-
]
253+
, -- H.yellow $
254+
mconcat
255+
[ "Please note "
256+
, {- H.underline -} "the order"
257+
, " of some cmd options is crucial. If used incorrectly may produce "
258+
, "undesired tx body. See nested [] notation above for details."
259+
]
261260
]
262261
, subParser
263262
"sign"

cardano-cli/src/Cardano/CLI/Options.hs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ import Cardano.CLI.Legacy.Options (parseLegacyCmds)
1919
import Cardano.CLI.Options.Debug
2020
import Cardano.CLI.Options.Hash
2121
import Cardano.CLI.Options.Ping (parsePingCmd)
22-
import Cardano.CLI.Render (customRenderHelp)
2322
import Cardano.CLI.Run (ClientCommand (..))
2423

2524
import Data.Foldable
2625
import Options.Applicative
2726
import qualified Options.Applicative as Opt
28-
import qualified Prettyprinter as PP
2927

3028
opts :: EnvCli -> ParserInfo ClientCommand
3129
opts envCli =
@@ -45,8 +43,7 @@ pref =
4543
Opt.prefs $
4644
mconcat
4745
[ showHelpOnEmpty
48-
, helpEmbedBriefDesc PP.align
49-
, helpRenderHelp customRenderHelp
46+
, Opt.briefPrettyPrinter Opt.BriefPPAlign
5047
]
5148

5249
parseClientCommand :: EnvCli -> Parser ClientCommand

cardano-cli/src/Cardano/CLI/Render.hs

Lines changed: 0 additions & 65 deletions
This file was deleted.

cardano-cli/src/Cardano/CLI/Run.hs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import Cardano.CLI.EraBased.Commands
2020
import Cardano.CLI.EraBased.Run
2121
import Cardano.CLI.Legacy.Commands
2222
import Cardano.CLI.Legacy.Run (runLegacyCmds)
23-
import Cardano.CLI.Render (customRenderHelp)
2423
import Cardano.CLI.Run.Debug
2524
import Cardano.CLI.Run.Hash (runHashCmds)
2625
import Cardano.CLI.Run.Ping (PingClientCmdError (..), renderPingClientCmdError,
@@ -38,6 +37,7 @@ import Data.Version (showVersion)
3837
import Options.Applicative.Help.Core
3938
import Options.Applicative.Types (OptReader (..), Option (..), Parser (..),
4039
ParserInfo (..), ParserPrefs (..))
40+
import Options.Applicative.Help.Types (renderHelp)
4141
import System.Info (arch, compilerName, compilerVersion, os)
4242
import qualified System.IO as IO
4343

@@ -104,7 +104,7 @@ runDisplayVersion = do
104104

105105
helpAll :: ParserPrefs -> String -> [String] -> ParserInfo a -> IO ()
106106
helpAll pprefs progn rnames parserInfo = do
107-
IO.putStrLn $ customRenderHelp 80 (usage_help parserInfo)
107+
IO.putStrLn $ renderHelp 80 (usage_help parserInfo)
108108
IO.putStrLn ""
109109
go (infoParser parserInfo)
110110
where

0 commit comments

Comments
 (0)