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

PlutusIR.Compiler.Provenance

Description

Module handling provenances of terms.

Synopsis

Documentation

data Provenance a #

Indicates where a value comes from.

This is either an original annotation or a pieces of context explaining how the term relates to a previous Provenance. We also provide noProvenance for convenience.

The provenance should always be just the original annotation, if we have one. It should only be another kind of provenance if we're in the process of generating some term that doesn't correspond directly to a term in the original AST.

setProvenance :: Functor f => Provenance b -> f a -> f (Provenance b) #

Set the provenance on a term to the given value.

original :: Functor f => f a -> f (Provenance a) #

Mark all the annotations on a term as original. Useful for preparing terms for the PIR compiler.