Safe Haskell | None |
---|---|
Language | Haskell2010 |
Cardano.CLI.Helpers
Synopsis
- data HelpersError
- ensureNewFile :: (FilePath -> a -> IO ()) -> FilePath -> a -> ExceptT HelpersError IO ()
- ensureNewFileLBS :: FilePath -> ByteString -> ExceptT HelpersError IO ()
- pPrintCBOR :: LByteString -> ExceptT HelpersError IO ()
- readCBOR :: FilePath -> ExceptT HelpersError IO LByteString
- renderHelpersError :: HelpersError -> Text
- textShow :: Show a => a -> Text
- validateCBOR :: CBORObject -> LByteString -> Either HelpersError Text
Documentation
data HelpersError Source #
Constructors
CBORPrettyPrintError !DeserialiseFailure | |
CBORDecodingError !DeserialiseFailure | |
IOError' !FilePath !IOException | |
OutputMustNotAlreadyExist FilePath | |
ReadCBORFileFailure !FilePath !Text |
Instances
Show HelpersError Source # | |
Defined in Cardano.CLI.Helpers Methods showsPrec :: Int -> HelpersError -> ShowS # show :: HelpersError -> String # showList :: [HelpersError] -> ShowS # |
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 :: LByteString -> ExceptT HelpersError IO () Source #
validateCBOR :: CBORObject -> LByteString -> Either HelpersError Text Source #