dhall-1.24.0: A configuration language guaranteed to terminate

Safe HaskellNone
LanguageHaskell2010

Dhall.Binary

Contents

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

Standard versions

Encoding and decoding

class ToTerm a where Source #

Types that can be encoded as a CBOR Term

Methods

encode :: a -> Term Source #

Instances
ToTerm Import Source # 
Instance details

Defined in Dhall.Binary

Methods

encode :: Import -> Term Source #

ToTerm X Source # 
Instance details

Defined in Dhall.TypeCheck

Methods

encode :: X -> Term Source #

ToTerm a => ToTerm (Expr s a) Source # 
Instance details

Defined in Dhall.Binary

Methods

encode :: Expr s a -> Term Source #

class FromTerm a where Source #

Types that can be decoded from a CBOR Term

Methods

decode :: Term -> Maybe a Source #

Instances
FromTerm Import Source # 
Instance details

Defined in Dhall.Binary

FromTerm X Source # 
Instance details

Defined in Dhall.TypeCheck

Methods

decode :: Term -> Maybe X Source #

FromTerm a => FromTerm (Expr s a) Source # 
Instance details

Defined in Dhall.Binary

Methods

decode :: Term -> Maybe (Expr s a) Source #

encodeExpression :: Expr s Import -> Term Source #

Encode a Dhall expression as a CBOR Term

decodeExpression :: Term -> Either DecodingFailure (Expr s Import) Source #

Decode a Dhall expression from a CBOR Term

Exceptions