Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains logic for converting Dhall expressions to and from CBOR expressions which can in turn be converted to and from a binary representation
Synopsis
- encodeExpression :: Serialise (Expr Void a) => Expr Void a -> ByteString
- decodeExpression :: Serialise (Expr s a) => ByteString -> Either DecodingFailure (Expr s a)
- newtype DecodingFailure = CBORIsNotDhall ByteString
Encoding and decoding
encodeExpression :: Serialise (Expr Void a) => Expr Void a -> ByteString Source #
Encode a Dhall expression as a CBOR-encoded ByteString
decodeExpression :: Serialise (Expr s a) => ByteString -> Either DecodingFailure (Expr s a) Source #
Decode a Dhall expression from a CBOR Term
Exceptions
newtype DecodingFailure Source #
This indicates that a given CBOR-encoded ByteString
did not correspond to
a valid Dhall expression
Instances
Exception DecodingFailure Source # | |
Defined in Dhall.Binary | |
Show DecodingFailure Source # | |
Defined in Dhall.Binary showsPrec :: Int -> DecodingFailure -> ShowS # show :: DecodingFailure -> String # showList :: [DecodingFailure] -> ShowS # | |
Eq DecodingFailure Source # | |
Defined in Dhall.Binary (==) :: DecodingFailure -> DecodingFailure -> Bool # (/=) :: DecodingFailure -> DecodingFailure -> Bool # |