| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Cardano.CLI.Helper
Synopsis
- data HelpersError
- cborToText :: ByteString -> CIO e Text
- cborToTextByteString :: ByteString -> CIO e ByteString
- printWarning :: MonadIO m => String -> m ()
- ensureNewFile :: (FilePath -> a -> IO ()) -> FilePath -> a -> ExceptT HelpersError IO ()
- ensureNewFileLBS :: FilePath -> ByteString -> ExceptT HelpersError IO ()
- pPrintCBOR :: ByteString -> ExceptT HelpersError IO ()
- readCBOR :: FilePath -> ExceptT HelpersError IO ByteString
- renderHelpersError :: HelpersError -> Doc ann
- validateCBOR :: CBORObject -> ByteString -> Either HelpersError Text
- printEraDeprecationWarning :: (Typeable era, MonadIO m, ToCardanoEra eon) => eon era -> m ()
Documentation
data HelpersError Source #
Constructors
| CBORPrettyPrintError !DeserialiseFailure | |
| CBORDecodingError !DeserialiseFailure | |
| OutputMustNotAlreadyExist FilePath | |
| ReadCBORFileFailure !FilePath !Text |
Instances
| Show HelpersError Source # | |
Defined in Cardano.CLI.Helper | |
| Error HelpersError Source # | |
Defined in Cardano.CLI.Helper Methods prettyError :: HelpersError -> Doc ann Source # | |
cborToText :: ByteString -> CIO e Text Source #
cborToTextByteString :: ByteString -> CIO e ByteString Source #
printWarning :: MonadIO m => String -> m () Source #
ensureNewFile :: (FilePath -> a -> IO ()) -> FilePath -> a -> ExceptT HelpersError IO () Source #
Checks if a path exists and throws and error if it does.
ensureNewFileLBS :: FilePath -> ByteString -> ExceptT HelpersError IO () Source #
pPrintCBOR :: ByteString -> ExceptT HelpersError IO () Source #
renderHelpersError :: HelpersError -> Doc ann Source #
validateCBOR :: CBORObject -> ByteString -> Either HelpersError Text Source #
printEraDeprecationWarning :: (Typeable era, MonadIO m, ToCardanoEra eon) => eon era -> m () Source #