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

PlutusIR.Generators.QuickCheck.ShrinkTerms

Synopsis

Documentation

findHelp ∷ Map Name (Type TyName DefaultUni ()) → Maybe Name Source #

Try to find a variable of type `forall x. x` in the context.

fixupTerm_TypeCtx → Map Name (Type TyName DefaultUni ()) → TypeCtx → Map Name (Type TyName DefaultUni ()) → Type TyName DefaultUni () → Term TyName Name DefaultUni DefaultFun () → (Type TyName DefaultUni (), Term TyName Name DefaultUni DefaultFun ()) Source #

Try to take a term from an old context to a new context and a new type. If we can't do the new type we might return a different type.

fixupTermTypeCtx → Map Name (Type TyName DefaultUni ()) → TypeCtx → Map Name (Type TyName DefaultUni ()) → Type TyName DefaultUni () → Term TyName Name DefaultUni DefaultFun () → Term TyName Name DefaultUni DefaultFun () Source #

Try to take a term from an old context to a new context and a new type - default to mkHelp.

shrinkTypedTermHasCallStackTypeCtx → Map Name (Type TyName DefaultUni ()) → (Type TyName DefaultUni (), Term TyName Name DefaultUni DefaultFun ()) → [(Type TyName DefaultUni (), Term TyName Name DefaultUni DefaultFun ())] Source #

Shrink a typed term in a type and term context. NOTE: if you want to understand what's going on in this function it's a good idea to look at how we do this for types first (it's a lot simpler).