dhall-1.42.2: A configuration language guaranteed to terminate

Safe Haskell | None
Language | Haskell2010

Dhall.Binary

Contents

- Encoding and decoding
- Exceptions
- Orphan instances

Description

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 #

Encode a Dhall expression as a CBOR-encoded `ByteString`

decodeExpression :: Serialise (Expr s a) => ByteString -> Either DecodingFailure (Expr s a) #

Decode a Dhall expression from a CBOR `Term`

# Exceptions

newtype DecodingFailure #

This indicates that a given CBOR-encoded `ByteString` did not correspond to a valid Dhall expression

Constructors

CBORIsNotDhall ByteString |

#### Instances

Instances details

Exception DecodingFailure # |
Instance details Defined in Dhall.Binary Methods toException :: DecodingFailure -> SomeException # fromException :: SomeException -> Maybe DecodingFailure # displayException :: DecodingFailure -> String # backtraceDesired :: DecodingFailure -> Bool #
Show DecodingFailure # |
Instance details Defined in Dhall.Binary Methods showsPrec :: Int -> DecodingFailure -> ShowS # show :: DecodingFailure -> String # showList :: [DecodingFailure] -> ShowS #
Eq DecodingFailure # |
Instance details Defined in Dhall.Binary Methods (==) :: DecodingFailure -> DecodingFailure -> Bool # (/=) :: DecodingFailure -> DecodingFailure -> Bool #

# Orphan instances

Serialise (Expr Void Import) # |
Instance details Methods encode :: Expr Void Import -> Encoding # decode :: Decoder s (Expr Void Import) # encodeList :: [Expr Void Import] -> Encoding # decodeList :: Decoder s [Expr Void Import] #
Serialise (Expr Void Void) # |
Instance details Methods encode :: Expr Void Void -> Encoding # decode :: Decoder s (Expr Void Void) # encodeList :: [Expr Void Void] -> Encoding # decodeList :: Decoder s [Expr Void Void] #