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

PlutusIR.Analysis.Usages

Description

Functions for computing variable usage inside terms and types.

Synopsis

Documentation

termUsages ∷ (HasUnique name TermUnique, HasUnique tyname TypeUnique) ⇒ Term tyname name uni fun a → Usages Source #

typeUsagesHasUnique tyname TypeUniqueType tyname uni a → Usages Source #

type Usages = MultiSet Unique Source #

getUsageCountHasUnique n unique ⇒ n → UsagesInt Source #

Get the usage count of n.

allUsedUsages → Set Unique Source #

Get a set of ns which are used at least once.