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

PlutusIR.Pass.Test

Synopsis

Documentation

numTestsForPassPropInt Source #

An appropriate number of tests for a compiler pass property, so that we get some decent exploration of the program space. If you also take other arguments, then consider multiplying this up in order to account for the larger space.

runTestPass ∷ (ThrowableBuiltins uni fun, Typecheckable uni fun, Pretty a, Typeable a, Monoid a, Monad m) ⇒ (PirTCConfig uni fun → Pass m tyname name uni fun a) → Term tyname name uni fun a → m (Term tyname name uni fun a) Source #

Run a Pass on a Term, setting up the typechecking config and throwing errors.

testPassPropMonad m ⇒ (∀ a. m a → a) → (PirTCConfig DefaultUni DefaultFunPass m TyName Name DefaultUni DefaultFun ()) → Property Source #

Run a Pass on generated Termss, setting up the typechecking config and throwing errors.

testPassProp' ∷ ∀ m tyname name a prop. (Monad m, Testable prop) ⇒ a → (Term TyName Name DefaultUni DefaultFun () → Term tyname name DefaultUni DefaultFun a) → (ExceptT (Error DefaultUni DefaultFun a) m () → prop) → (PirTCConfig DefaultUni DefaultFunPass m tyname name DefaultUni DefaultFun a) → Property Source #

A version of testPassProp with more control, allowing some pre-processing of the term, and a more specific "exit" function.

Orphan instances