Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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
- type UniqueInfos ann = UniqueMap Unique (UniqueInfo ann)
- termDefs ∷ (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, MonadState (UniqueInfos ann) m, MonadWriter [UniqueError ann] m) ⇒ Term tyname name uni fun ann → m ()
- runTermDefs ∷ (Ord ann, HasUnique name TermUnique, HasUnique tyname TypeUnique, Monad m) ⇒ Term tyname name uni fun ann → m (UniqueInfos ann, [UniqueError ann])
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 #