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

PlutusIR.Analysis.Definitions

Description

Definition analysis for Plutus IR. This mostly adapts term-related code from PlutusCore.Analysis.Definitions; we just re-use the typed machinery to do the hard work here.

Synopsis

Documentation

type UniqueInfos ann = UniqueMap Unique (UniqueInfo ann) Source #

termDefs ∷ (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) ⇒ Term tyname name uni fun ann → m () Source #

Given a PIR term, add all of its term and type definitions and usages, including its subterms and subtypes, to a global map.

runTermDefs ∷ (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, Monad m) ⇒ Term tyname name uni fun ann → m (UniqueInfos ann, [UniqueError ann]) Source #