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

PlutusIR.Generators.QuickCheck.ShrinkTerms

Synopsis

Documentation

findHelpMap Name (Type TyName DefaultUni ()) → Maybe Name Source #

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

fixupTerm_TypeCtxMap Name (Type TyName DefaultUni ()) → TypeCtxMap 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.

fixupTermTypeCtxMap Name (Type TyName DefaultUni ()) → TypeCtxMap 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.

shrinkTypedTermHasCallStackTypeCtxMap 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).