plutus-core-1.36.0.0: Language library for Plutus Core
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusCore.Generators.Hedgehog.Denotation

Description

This module defines tools for associating PLC terms with their corresponding Haskell values.

Synopsis

Documentation

type KnownType val a = (KnownTypeAst TyName (UniOf val) a, MakeKnown val a) Source #

data Denotation term object res Source #

Haskell denotation of a PLC object. An object can be a Builtin or a variable for example.

Constructors

∀ args. Denotation 

Fields

data DenotationContextMember term res Source #

A member of a DenotationContext. object is existentially quantified, so the only thing that can be done with it, is turning it into a Term using _denotationToTerm.

Constructors

∀ object. DenotationContextMember (Denotation term object res) 

newtype DenotationContext term Source #

A context of DenotationContextMembers. Each row is a mapping from a type to a list of things that can return that type. For example it can contain a mapping from integer to 1. a bound variable of type integer 2. a bound variable of functional type with the result being integer 3. the AddInteger Builtin or any other Builtin which returns an integer.

lookupInContext ∷ ∀ a term. TypeRep a → DenotationContext term → [DenotationContextMember term a] Source #

Look up a list of Denotations from DenotationContext each of which has a type that ends in the same type as the one that the TypeRep argument represents.

denoteVariableKnownType (Term TyName Name uni fun ()) res ⇒ NameTypeRep res → res → Denotation (Term TyName Name uni fun ()) Name res Source #

Get the Denotation of a variable.

insertVariableKnownType (Term TyName Name uni fun ()) a ⇒ NameTypeRep a → a → DenotationContext (Term TyName Name uni fun ()) → DenotationContext (Term TyName Name uni fun ()) Source #

Insert a variable into a DenotationContext.

typedBuiltinsDenotationContext (Term TyName Name DefaultUni DefaultFun ()) Source #

A DenotationContext that consists of DefaultFuns.

DEPRECATED: No need to update for a new builtin. Outdated, since we moved to quickcheck generators.