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

UntypedPlutusCore.Test.DeBruijn.Bad

Synopsis

Documentation

var0 ∷ Term DeBruijn uni fun () Source #

A definitely out-of-scope variable. Our variables start at index 1.

lamAbs1 ∷ t ~ Term DeBruijn uni fun () ⇒ t → t Source #

Build a LamAbs with the binder having a non-sensical index.

deepFun1 ∷ Natural → Term DeBruijn DefaultUni DefaultFun () Source #

(lam1 ...n.... (Var n)) Wrong binders, Well-scoped variable

deepOut0 ∷ Natural → Term DeBruijn DefaultUni DefaultFun () Source #

(lam0 ...n.... (Var n+1)) Correct binders, Out-of-scope variable

deepMix0_1 ∷ Natural → Term DeBruijn DefaultUni DefaultFun () Source #

(lam0 ...n.... lam1 ...n.... (Var n+n)) Mix of correct and wrong binders, Well-scoped variable

deepMix1_0 ∷ Natural → Term DeBruijn DefaultUni DefaultFun () Source #

(lam1 ...n.... lam0 ...n.... (Var n+n)) Mix of wrong and correct binders, well-scoped variable

deepOutMix1_0 ∷ Natural → Term DeBruijn DefaultUni DefaultFun () Source #

(lam1 ...n.... lam0 ...n.... (Var n+n+1)) Mix of correct and wrong binders, out-of-scope variable

manyFree01 ∷ Term DeBruijn DefaultUni DefaultFun () Source #

An example with a lot of free vars

iteStrict0 ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(force (builtin ifThenElse) (con bool True) (con bool True) var99
Both branches are evaluated *before* the predicate, so it is clear that this should fail in every case.

iteLazy0 ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(force (builtin ifThenElse) (con bool True) (delay true) (delay var99)
The branches are *lazy*. The evaluation result (success or failure) depends on how the machine ignores the irrelevant to the computation) part of the environment.

ite10 ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(force (builtin ifThenElse) (con bool True) (lam0 var1) (lam1 var0)

illITEStrict ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(force (builtin ifThenElse) (con bool True) (con bool True) (con unit ())
Note that the branches have **different** types. The machine cannot catch such a type error.

illITELazy ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(force (builtin ifThenElse) (con bool True) (lam x (con bool True)) (lam x (con unit ()))
The branches are *lazy*. Note that the branches have **different** types. The machine cannot catch such a type error.

illPartialBuiltin ∷ Term DeBruijn DefaultUni DefaultFun () Source #

addInteger true
this relates to the immediate vs deferred unlifting. this used to be an immediate type error but now it is deferred until saturation.

illAdd ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(builtin addInteger) (con integer 1) (con unit ())
Interesting because it involves a runtime type-error of a builtin.

illOverAppBuiltin ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(builtin addInteger) (con integer 1) (con integer 1) (con integer 1)
Interesting because it involves a (builtin) over-saturation type-error, which the machine can recognize.

illOverAppFun ∷ Term DeBruijn DefaultUni DefaultFun () Source #

(lam x x) (con integer 1) (con integer 1)
Interesting because it involves a (lambda) over-saturation type-error, which the machine can recognize.