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

PlutusIR.Pass

Synopsis

data BiCondition tyname name uni fun a where #

A condition on a pair of Terms.

Constructors

ConstCondition :: Condition tyname name uni fun a -> BiCondition tyname name uni fun a

A condition on the second Term.

CustomBi :: (Term tyname name uni fun a -> Term tyname name uni fun a -> Text)) -> BiCondition tyname name uni fun a

A custom condition. Nothing indicates success, Just indicates a failure at a location with a message.

checkCondition :: (AnnotateCaseBuiltin uni) => BiCondition tyname name uni fun a -> Term tyname name uni fun a -> Term tyname name uni fun a -> m () #

data Pass m tyname name uni fun a #

A pass over a term, with pre- and post-conditions.

Constructors

Pass (Term tyname name uni fun a -> m (Term tyname name uni fun a)) [Condition tyname name uni fun a] [BiCondition tyname name uni fun a]

A basic pass. Has a function, which is the pass itself, a set of pre-conditions which are run on the input term, and a set of post-conditions which are run on the input and output terms (so can compare them).

CompoundPass (Pass m tyname name uni fun a) (Pass m tyname name uni fun a) 
NoOpPass 
NamedPass MonadQuote m, Ord a) => Pass m tyname name uni fun a #

A pass that does renaming.

typecheckPass :: (MonadTypeCheckPir uni fun a m, Ord a) => PirTCConfig uni fun -> Pass m TyName Name uni fun a #

A pass that does typechecking, useful when you want to do it explicitly and not as part of a precondition check.