module Testnet.Commands where

import           Data.Function
import           Data.Monoid
import           Options.Applicative
import           System.IO (IO)
import           Testnet.Commands.Byron
import           Testnet.Commands.Cardano
import           Testnet.Commands.Shelley
import           Testnet.Commands.Version

{- HLINT ignore "Monoid law, left identity" -}

commands :: Parser (IO ())
commands :: Parser (IO ())
commands = Parser (IO ())
commandsTestnet Parser (IO ()) -> Parser (IO ()) -> Parser (IO ())
forall (f :: * -> *) a. Alternative f => f a -> f a -> f a
<|> Parser (IO ())
commandsGeneral

commandsTestnet :: Parser (IO ())
commandsTestnet :: Parser (IO ())
commandsTestnet = Mod CommandFields (IO ()) -> Parser (IO ())
forall a. Mod CommandFields a -> Parser a
hsubparser (Mod CommandFields (IO ()) -> Parser (IO ()))
-> Mod CommandFields (IO ()) -> Parser (IO ())
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (IO ())
forall a. Monoid a => a
mempty
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  String -> Mod CommandFields (IO ())
forall a. String -> Mod CommandFields a
commandGroup String
"Testnets:"
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  Mod CommandFields (IO ())
cmdByron
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  Mod CommandFields (IO ())
cmdCardano
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  Mod CommandFields (IO ())
cmdShelley

commandsGeneral :: Parser (IO ())
commandsGeneral :: Parser (IO ())
commandsGeneral = Mod CommandFields (IO ()) -> Parser (IO ())
forall a. Mod CommandFields a -> Parser a
hsubparser (Mod CommandFields (IO ()) -> Parser (IO ()))
-> Mod CommandFields (IO ()) -> Parser (IO ())
forall a b. (a -> b) -> a -> b
$ Mod CommandFields (IO ())
forall a. Monoid a => a
mempty
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  String -> Mod CommandFields (IO ())
forall a. String -> Mod CommandFields a
commandGroup String
"General:"
  Mod CommandFields (IO ())
-> Mod CommandFields (IO ()) -> Mod CommandFields (IO ())
forall a. Semigroup a => a -> a -> a
<>  Mod CommandFields (IO ())
cmdVersion