cardano-cli-1.36.0: The Cardano command-line interface
Safe HaskellSafe-Inferred
LanguageHaskell2010

Cardano.CLI.Helpers

Synopsis

Documentation

ensureNewFile ∷ (FilePath → a → IO ()) → FilePath → a → ExceptT HelpersError IO () Source #

Checks if a path exists and throws and error if it does.

hushM ∷ ∀ e m a. Monad m ⇒ Either e a → (e → m ()) → m (Maybe a) Source #

Convert an Either to a Maybe and execute the supplied handler in the Left case.