binary

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package binary defines the CBOR representation of Dhall terms.

Index

Constants

View Source
const (
	HttpImport     = 0
	HttpsImport    = 1
	AbsoluteImport = 2
	HereImport     = 3
	ParentImport   = 4
	HomeImport     = 5
)

Variables

This section is empty.

Functions

func DecodeAsCbor

func DecodeAsCbor(r io.Reader) (Term, error)

DecodeAsCbor decodes CBOR from the io.Reader and returns the resulting Expr

func EncodeAsCbor

func EncodeAsCbor(w io.Writer, e Term) error

EncodeAsCbor encodes a Term as CBOR and writes it to the io.Writer

func SemanticHash

func SemanticHash(e term.Term) ([]byte, error)

SemanticHash returns the semantic hash of an expression. The semantic hash is defined as the multihash-encoded sha256 sum of the CBOR representation of the fully alpha-beta-normalized expression.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL