{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} module Cardano.CLI.EraBased.TextView.Command ( TextViewCmds (..) , TextViewDecodeCborCmdArgs (..) , renderTextViewCmds ) where import Cardano.Api.Shelley import Cardano.CLI.Type.Common (FormatCborHex, FormatText) import Data.Text (Text) import Vary newtype TextViewCmds era = TextViewDecodeCborCmd TextViewDecodeCborCmdArgs deriving Int -> TextViewCmds era -> ShowS [TextViewCmds era] -> ShowS TextViewCmds era -> String (Int -> TextViewCmds era -> ShowS) -> (TextViewCmds era -> String) -> ([TextViewCmds era] -> ShowS) -> Show (TextViewCmds era) forall era. Int -> TextViewCmds era -> ShowS forall era. [TextViewCmds era] -> ShowS forall era. TextViewCmds era -> String forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: forall era. Int -> TextViewCmds era -> ShowS showsPrec :: Int -> TextViewCmds era -> ShowS $cshow :: forall era. TextViewCmds era -> String show :: TextViewCmds era -> String $cshowList :: forall era. [TextViewCmds era] -> ShowS showList :: [TextViewCmds era] -> ShowS Show data TextViewDecodeCborCmdArgs = TextViewDecodeCborCmdArgs { TextViewDecodeCborCmdArgs -> String inputFile :: !FilePath , TextViewDecodeCborCmdArgs -> Vary '[FormatCborHex, FormatText] outputFormat :: !(Vary [FormatCborHex, FormatText]) , TextViewDecodeCborCmdArgs -> Maybe (File () 'Out) mOutFile :: Maybe (File () Out) } deriving Int -> TextViewDecodeCborCmdArgs -> ShowS [TextViewDecodeCborCmdArgs] -> ShowS TextViewDecodeCborCmdArgs -> String (Int -> TextViewDecodeCborCmdArgs -> ShowS) -> (TextViewDecodeCborCmdArgs -> String) -> ([TextViewDecodeCborCmdArgs] -> ShowS) -> Show TextViewDecodeCborCmdArgs forall a. (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a $cshowsPrec :: Int -> TextViewDecodeCborCmdArgs -> ShowS showsPrec :: Int -> TextViewDecodeCborCmdArgs -> ShowS $cshow :: TextViewDecodeCborCmdArgs -> String show :: TextViewDecodeCborCmdArgs -> String $cshowList :: [TextViewDecodeCborCmdArgs] -> ShowS showList :: [TextViewDecodeCborCmdArgs] -> ShowS Show renderTextViewCmds :: TextViewCmds era -> Text renderTextViewCmds :: forall era. TextViewCmds era -> Text renderTextViewCmds = \case TextViewDecodeCborCmd TextViewDecodeCborCmdArgs _ -> Text "text-view decode-cbor"