Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data HelpersError
- = CBORPrettyPrintError !DeserialiseFailure
- | CBORDecodingError !DeserialiseFailure
- | IOError' !FilePath !IOException
- | OutputMustNotAlreadyExist FilePath
- | ReadCBORFileFailure !FilePath !Text
- deprecationWarning ∷ String → IO ()
- 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
- hushM ∷ ∀ e m a. Monad m ⇒ Either e a → (e → m ()) → m (Maybe a)
Documentation
data HelpersError Source #
CBORPrettyPrintError !DeserialiseFailure | |
CBORDecodingError !DeserialiseFailure | |
IOError' !FilePath !IOException | |
OutputMustNotAlreadyExist FilePath | |
ReadCBORFileFailure !FilePath !Text |
Instances
Show HelpersError Source # | |
Defined in Bcc.CLI.Helpers |
deprecationWarning ∷ String → IO () 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 ∷ LByteString → ExceptT HelpersError IO () Source #
validateCBOR ∷ CBORObject → LByteString → Either HelpersError Text Source #