plutus-tx-1.46.0.0: Libraries for Plutus Tx and its prelude
Safe HaskellSafe-Inferred
LanguageHaskell2010

PlutusTx.Test.Util.Compiled

Synopsis

Documentation

toAnonDeBruijnTermTermTerm DeBruijn DefaultUni DefaultFun () Source #

Remove the textual names from a NamedDeBruijn term

toNamedDeBruijnTermTerm DeBruijn DefaultUni DefaultFun () → Term NamedDeBruijn DefaultUni DefaultFun () Source #

Given a DeBruijn-named term, give every variable the name "v". If we later call unDeBruijn, that will rename the variables to things like "v123", where 123 is the relevant de Bruijn index.

compiledCodeToTermCompiledCodeIn DefaultUni DefaultFun a → Term Source #

Just extract the body of a program wrapped in a CompiledCodeIn. We use this a lot.

cekResultMatchesHaskellValueLift DefaultUni hask ⇒ Term → (∀ r. (Eq r, Show r) ⇒ r → r → k) → hask → k Source #

Evaluate a PLC term and check that the result matches a given Haskell value (perhaps obtained by running the Haskell code that the term was compiled from). We evaluate the lifted Haskell value as well, because lifting may produce reducible terms. The function is polymorphic in the comparison operator so that we can use it with both HUnit Assertions and QuickCheck Properties.