{-# LANGUAGE DataKinds #-} {-# LANGUAGE LambdaCase #-} {-# LANGUAGE RankNTypes #-} module Cardano.CLI.Compatible.Governance.Run ( runCompatibleGovernanceCmds ) where import Cardano.CLI.Compatible.Exception import Cardano.CLI.Compatible.Governance.Command import Cardano.CLI.EraBased.Governance.Run import Data.Typeable (Typeable) runCompatibleGovernanceCmds :: Typeable era => CompatibleGovernanceCmds era -> CIO e () runCompatibleGovernanceCmds :: forall era e. Typeable era => CompatibleGovernanceCmds era -> CIO e () runCompatibleGovernanceCmds = \case CreateCompatibleProtocolUpdateCmd GovernanceCmds era cmd -> ExceptT CmdError IO () -> RIO e () forall e (m :: * -> *) a. (HasCallStack, MonadIO m, Show e, Typeable e, Error e) => ExceptT e IO a -> m a fromExceptTCli (ExceptT CmdError IO () -> RIO e ()) -> ExceptT CmdError IO () -> RIO e () forall a b. (a -> b) -> a -> b $ GovernanceCmds era -> ExceptT CmdError IO () forall era. Typeable era => GovernanceCmds era -> ExceptT CmdError IO () runGovernanceCmds GovernanceCmds era cmd