Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Module handling provenances of terms.
Synopsis
- data Provenance a
- = Original a
- | LetBinding Recursivity (Provenance a)
- | TermBinding String (Provenance a)
- | TypeBinding String (Provenance a)
- | DatatypeComponent DatatypeComponent (Provenance a)
- | MultipleSources (Set (Provenance a))
- noProvenance ∷ Provenance a
- data DatatypeComponent
- data GeneratedKind = RecursiveLet
- setProvenance ∷ Functor f ⇒ Provenance b → f a → f (Provenance b)
- original ∷ Functor f ⇒ f a → f (Provenance a)
Documentation
data Provenance a Source #
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.
Original a | |
LetBinding Recursivity (Provenance a) | |
TermBinding String (Provenance a) | |
TypeBinding String (Provenance a) | |
DatatypeComponent DatatypeComponent (Provenance a) | |
MultipleSources (Set (Provenance a)) | Added for accumulating difference provenances when floating lets |
Instances
data DatatypeComponent Source #
Instances
data GeneratedKind Source #
Instances
Show GeneratedKind Source # | |
Defined in PlutusIR.Compiler.Provenance | |
Eq GeneratedKind Source # | |
Defined in PlutusIR.Compiler.Provenance (==) ∷ GeneratedKind → GeneratedKind → Bool Source # (/=) ∷ GeneratedKind → GeneratedKind → Bool Source # | |
Pretty GeneratedKind Source # | |
Defined in PlutusIR.Compiler.Provenance pretty ∷ GeneratedKind → Doc ann Source # prettyList ∷ [GeneratedKind] → Doc ann Source # |
setProvenance ∷ Functor f ⇒ Provenance b → f a → f (Provenance b) Source #
Set the provenance on a term to the given value.
original ∷ Functor f ⇒ f a → f (Provenance a) Source #
Mark all the annotations on a term as original. Useful for preparing terms for the PIR compiler.