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

PlutusCore.Generators.Hedgehog.Utils

Description

Utilities used in modules from the TestSupport folder.

Synopsis

Documentation

liftT ∷ (MFunctor t, MonadTrans s, Monad m) ⇒ t m a → t (s m) a Source #

hoist lift

generalizeT ∷ (MFunctor t, Monad m) ⇒ t Identity a → t m a Source #

hoist generalize

hoistSupply ∷ (MFunctor t, Monad m) ⇒ r → t (ReaderT r m) a → t m a Source #

Supply an environment to an inner ReaderT.

choiceDefMonad m ⇒ GenT m a → [GenT m a] → GenT m a Source #

Same as choice, but with a default generator to be used when the supplied list of generators is empty.

forAllNoShowMonad m ⇒ Gen a → PropertyT m a Source #

Generate a value, but do not show it in case an error occurs.

forAllNoShowTMonad m ⇒ GenT m a → PropertyT m a Source #

Generate a value, but do not show it in case an error occurs. A supplied generator has access to the Monad the whole property has access to.

forAllPretty ∷ (Monad m, Pretty a) ⇒ Gen a → PropertyT m a Source #

Generate a value using the Pretty class for getting its String representation.

forAllPrettyT ∷ (Monad m, Pretty a) ⇒ GenT m a → PropertyT m a Source #

Generate a value using the Pretty class for getting its String representation. A supplied generator has access to the Monad the whole property has access to.

forAllPrettyPlc ∷ (Monad m, PrettyPlc a) ⇒ Gen a → PropertyT m a Source #

Generate a value using the PrettyPlc constraint for getting its String representation.

forAllPrettyPlcT ∷ (Monad m, PrettyPlc a) ⇒ GenT m a → PropertyT m a Source #

Generate a value using the PrettyPlc constraint for getting its String representation. A supplied generator has access to the Monad the whole property has access to.

prettyPlcErrorStringPrettyPlc err ⇒ err → String Source #

Pretty-print a PLC error.